-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update wp-tests to 8.0.1 and introduce phpgrep
- Loading branch information
Showing
5 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ RUN apt-get update \ | |
&& add-apt-repository ppa:ondrej/php \ | ||
&& apt-get update | ||
|
||
RUN apt-get install -y mysql-server libmysqlclient-dev --no-install-recommends | ||
RUN apt-get update && apt-get install -y mysql-server libmysqlclient-dev --no-install-recommends | ||
|
||
RUN apt-get install -y php7.3 php7.3-common php7.3-dev php7.3-dom php7.3-xdebug php7.3-zip php7.3-cli php7.3-mbstring php7.3-pdo php7.3-fpm php7.3-curl php7.3-mysql php7.3-gd php7.3-readline | ||
|
||
|
@@ -29,10 +29,15 @@ RUN sed -i "/upload_max_filesize = .*/c\upload_max_filesize = 200M" /etc/php/7.3 | |
&& sed -i "/memory_limit = .*/c\memory_limit = 256M" /etc/php/7.3/cli/php.ini \ | ||
&& sed -i "s/zend_extension/;zend_extension/g" /etc/php/7.3/mods-available/xdebug.ini | ||
|
||
|
||
RUN tar -zxvf /opt/wp-tests-8.0.1.tar.gz -C /opt | ||
RUN chown root:root /opt/wp-tests -R | ||
|
||
# Install GO (required for phpgrep) | ||
RUN curl -O https://dl.google.com/go/go1.13.linux-amd64.tar.gz \ | ||
&& tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz | ||
RUN export PATH=$PATH:/usr/local/go/bin | ||
RUN /usr/local/go/bin/go get -v github.com/quasilyte/phpgrep/cmd/phpgrep && sudo chmod +x /root/go/bin/phpgrep && sudo /root/go/bin/phpgrep /usr/local/bin/phpgrep | ||
|
||
WORKDIR /var/www/html | ||
|
||
# Configure mysql sock | ||
|
@@ -52,7 +57,7 @@ RUN usermod -d /var/lib/mysql mysql && find /var/lib/mysql -exec touch {} \; && | |
RUN find /var/lib/mysql -exec touch {} \; && /etc/init.d/mysql start \ | ||
&& wp core download --path=/var/www/html --allow-root \ | ||
&& wp core config --path=/var/www/html --dbhost=127.0.0.1 --dbname=test --dbuser=wpuser --dbpass=wpuser --allow-root \ | ||
&& wp core install --url=http://localhost --title=Test --admin_user=admin --admin_password=12345 [email protected] --path=/var/www/html --allow-root | ||
&& wp core install --url=http://localhost --title=Test --admin_user=admin --admin_password=12345 [email protected] --path=/var/www/html --allow-root --skip-email | ||
|
||
# Install node and chrome | ||
RUN \ | ||
|
@@ -74,4 +79,4 @@ RUN \ | |
export npm_config_unsafe_perm=true | ||
|
||
# Start the mysql | ||
ENTRYPOINT /etc/init.d/mysql start && bash | ||
ENTRYPOINT find /var/lib/mysql -type f -exec touch {} \; && service mysql start && bash |