-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
66 lines (58 loc) · 2.84 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# WordPress with ThemeIsle Development Environment
# Docker Hub: https://hub.docker.com/r/hardeepasrani/pirate-brewery/
# Github Repo: https://github.com/HardeepAsrani/pirate-brewery/
# Use WordPress as the base image
FROM wordpress:latest
# Copy wp-su.sh
COPY wp-su.sh /bin/wp
# Copy publish.sh
COPY publish.sh /bin/publish
# Copy entrypoint
COPY docker-pirate-entrypoint.sh /usr/local/bin/
# Copy Vim Config
COPY vim_config.txt /vim_config.txt
# Setup ThemeIsle Development Environment
RUN apt-get update \
# Install required packages
&& apt-get install -y --no-install-recommends sudo less wget default-mysql-client gnupg gnupg2 gnupg1 git subversion nano unzip vim \
# Configure Vim
&& git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime \
&& sh ~/.vim_runtime/install_awesome_vimrc.sh \
&& mv /vim_config.txt ~/.vim_runtime/my_configs.vim \
&& git clone --depth=1 https://github.com/tomasiser/vim-code-dark.git ~/.vim \
# Install Xdebug
&& pecl install xdebug && docker-php-ext-enable xdebug \
# Install WP-CLI
&& curl -o /bin/wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x /bin/wp-cli.phar /bin/wp /bin/publish \
# Install Node and npm
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y nodejs \
# Install Composer
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv /var/www/html/composer.phar /bin/composer \
# Install PHP CodeSniffer, WordPress CS & PHP Unit
&& composer g require --dev squizlabs/php_codesniffer wp-coding-standards/wpcs phpcompatibility/php-compatibility automattic/vipwpcs dealerdirect/phpcodesniffer-composer-installer phpunit/phpunit=6.5 -W \
# Install Yarn, Grunt and GruntCLI
&& npm install -g yarn grunt grunt-cli \
# Checkout WordPress' PHP Unit Files
&& mkdir /tmp/wordpress-tests-lib/ \
&& svn checkout --ignore-externals https://develop.svn.wordpress.org/trunk/tests/phpunit/includes/ /tmp/wordpress-tests-lib/includes/ \
&& svn checkout --ignore-externals https://develop.svn.wordpress.org/trunk/tests/phpunit/data/ /tmp/wordpress-tests-lib/data/ \
&& curl -O https://develop.svn.wordpress.org/trunk/wp-tests-config-sample.php \
&& mv wp-tests-config-sample.php /tmp/wordpress-tests-lib/wp-tests-config-sample.php \
# Configure ngrok
&& curl -O https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip \
&& unzip ngrok-stable-linux-amd64.zip \
&& mv ngrok /bin/ngrok \
&& rm ngrok-stable-linux-amd64.zip \
# Remove unuseable packages
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/pear /var/tmp/*
# Setup Entrypoint
ENTRYPOINT [ "docker-pirate-entrypoint.sh" ]
# Start Apache Process
CMD [ "apache2-foreground" ]