WordPress Core Unit Tests
version: '3.3' | |
services: | |
wordpress: | |
build: ./docker | |
entrypoint: '' | |
working_dir: /wp | |
command: /bin/bash | |
stdin_open: true | |
tty: true | |
networks: | |
- wpnet | |
ports: | |
- 80:80 | |
volumes: | |
- $PWD:/wp | |
mysql: | |
image: mysql:5.7 | |
networks: | |
wpnet: | |
aliases: | |
- dbhost | |
environment: | |
MYSQL_ROOT_PASSWORD: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
MYSQL_DATABASE: wordpress | |
networks: | |
wpnet: |
FROM ubuntu | |
WORKDIR /tmp | |
ENV PACKAGES="\ | |
composer \ | |
curl \ | |
git \ | |
imagemagick \ | |
locales-all \ | |
php-curl \ | |
php-gd \ | |
php-imagick \ | |
php-intl \ | |
php-mbstring \ | |
php-mysql \ | |
php-pear \ | |
php-xdebug \ | |
php-zip \ | |
" | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV TZ=UTC | |
ENV NVM_DIR="/root/.nvm" | |
ENV NODE_VERSION 10.15.0 | |
RUN apt-get update && \ | |
apt-get install -yq --no-install-recommends $PACKAGES && \ | |
apt-get clean && \ | |
mkdir -p /root/.nvm && \ | |
touch ~/.bashrc && \ | |
touch ~/.bash_profile && \ | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash | |
RUN composer require phpunit/phpunit ^7 --prefer-source --no-interaction && \ | |
ln -s /tmp/vendor/bin/phpunit /usr/local/bin/phpunit | |
RUN . $NVM_DIR/nvm.sh && \ | |
nvm install $NODE_VERSION && \ | |
nvm alias default $NODE_VERSION && \ | |
nvm use default && \ | |
npm install -g grunt-cli | |
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | |
ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH | |
CMD /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment