File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed
Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -33,3 +33,7 @@ RUN npm install grunt-cli -g
3333
3434ENV PATH="/root/.composer/vendor/bin:${PATH}"
3535ENV WP_VERSION="4.9.1"
36+
37+ # DONT run as ROOT
38+ RUN useradd -ms /bin/bash phpcompat
39+ USER phpcompat
Original file line number Diff line number Diff line change 11SHELL := /bin/bash
2+ DC_DEV = docker-compose -f docker-compose.yml
23
34# WordPress management via docker-compose
5+ run :
6+ $(DC_DEV ) up
7+
48start :
5- docker-compose -f docker-compose.yml up -d
9+ $( DC_DEV ) up -d
610
711stop :
8- docker-compose -f docker-compose.yml stop
12+ $( DC_DEV ) stop
913
1014# One liner to get a shell inside the WordPress container.
11- shell :
15+ shell : start
1216 docker-compose exec wordpress /bin/bash -c " cd /var/www/html/wp-content/plugins/phpcompat/; /bin/bash"
17+
18+ test : start
19+ docker-compose exec wordpress /bin/bash -c " /var/www/html/wp-content/plugins/phpcompat/bin/test.sh"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ PLUGIN_ROOT=" /var/www/html/wp-content/plugins/phpcompat/"
6+
7+ main ()
8+ {
9+ cd " $PLUGIN_ROOT "
10+
11+ phpunit
12+ }
13+
14+ main " $@ "
You can’t perform that action at this time.
0 commit comments