File tree 3 files changed +28
-3
lines changed
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
33
33
34
34
ENV PATH="/root/.composer/vendor/bin:${PATH}"
35
35
ENV 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 1
1
SHELL := /bin/bash
2
+ DC_DEV = docker-compose -f docker-compose.yml
2
3
3
4
# WordPress management via docker-compose
5
+ run :
6
+ $(DC_DEV ) up
7
+
4
8
start :
5
- docker-compose -f docker-compose.yml up -d
9
+ $( DC_DEV ) up -d
6
10
7
11
stop :
8
- docker-compose -f docker-compose.yml stop
12
+ $( DC_DEV ) stop
9
13
10
14
# One liner to get a shell inside the WordPress container.
11
- shell :
15
+ shell : start
12
16
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