Skip to content

Commit 32d8fce

Browse files
authored
Merge pull request #94 from bryanlatten/build-run-tests
Dockerfile: using upstream AUFS bug workaround
2 parents 0d8f5f5 + 1228629 commit 32d8fce

File tree

10 files changed

+32
-13
lines changed

10 files changed

+32
-13
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,6 @@ RUN phpenmod overrides && \
108108
# Set nginx to listen on defined port \
109109
sed -i "s/listen [0-9]*;/listen ${CONTAINER_PORT};/" $CONF_NGINX_SITE
110110

111-
RUN goss -g goss.ubuntu.yaml validate
111+
RUN goss -g /tests/php-fpm/ubuntu.goss.yaml validate && \
112+
/tmp/aufs_hack.sh
112113

Dockerfile-alpine

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,5 @@ COPY ./container/root /
135135
RUN cp /etc/php/7.0/mods-available/* $CONF_PHPMODS && \
136136
rm $CONF_PHPMODS/00_opcache.ini
137137

138-
RUN goss -g goss.alpine.yaml validate
138+
RUN goss -g /tests/php-fpm/alpine.goss.yaml validate && \
139+
/tmp/aufs_hack.sh

Dockerfile-edge

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,5 @@ RUN cp /etc/php/7.0/mods-available/* $CONF_PHPMODS && \
117117
# Set nginx to listen on defined port \
118118
sed -i "s/listen [0-9]*;/listen ${CONTAINER_PORT};/" $CONF_NGINX_SITE
119119

120-
RUN goss -g goss.beta.yaml validate
120+
RUN goss -g /tests/php-fpm/beta.goss.yaml validate && \
121+
/tmp/aufs_hack.sh

container/root/app/public/index.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,16 @@
88
fwrite( $stderr, 'Using STDERR pipe for output' );
99

1010
phpinfo();
11+
12+
// Use the below form to test uploads
13+
?>
14+
15+
<form method="post" action="/" enctype="multipart/form-data">
16+
<p>
17+
Please specify a file, or a set of files:<br>
18+
<input type="file" name="datafile">
19+
</p>
20+
<div>
21+
<input type="submit" value="Send">
22+
</div>
23+
</form>

container/root/clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ apt-get autoclean -y && \
2424
apt-get autoremove -y && \
2525
rm -rf /var/lib/{cache,log}/ && \
2626
rm -rf /var/lib/apt/lists/ && \
27-
rm -rf /tmp/* /var/tmp/*
27+
rm -rf /var/tmp/*

container/root/goss.alpine.yaml renamed to container/root/tests/php-fpm/alpine.goss.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
gossfile:
2-
goss.base.yaml: {}
2+
base.goss.yaml: {}
33

44
package:
55
php7:

container/root/goss.base.yaml renamed to container/root/tests/php-fpm/base.goss.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
gossfile:
2+
../../goss.nginx.yaml: {}
3+
14
group:
25
www-data:
36
exists: true

container/root/goss.beta.yaml renamed to container/root/tests/php-fpm/beta.goss.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Note: base cannot be used because versions are different
22
# gossfile:
3-
# goss.base.yaml: {}
3+
# base.goss.yaml: {}
44
group:
55
www-data:
66
exists: true

container/root/goss.ubuntu.yaml renamed to container/root/tests/php-fpm/ubuntu.goss.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
gossfile:
2-
goss.base.yaml: {}
2+
base.goss.yaml: {}
33

44
package:
55
php7.0:

docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ ubuntu:
1515
S6_KILL_GRACETIME: 1
1616
volumes:
1717
- ./container/root/app:/app
18-
- ./container/root/goss.base.yaml:/goss.base.yaml
19-
- ./container/root/goss.ubuntu.yaml:/goss.ubuntu.yaml
18+
- ./container/root/tests/php-fpm/base.goss.yaml:/tests/php-fpm/base.goss.yaml
19+
- ./container/root/tests/php-fpm/ubuntu.goss.yaml:/tests/php-fpm/ubuntu.goss.yaml
2020
alpine:
2121
build: .
2222
dockerfile: Dockerfile-alpine
@@ -35,8 +35,8 @@ alpine:
3535
S6_KILL_GRACETIME: 1
3636
volumes:
3737
- ./container/root/app:/app
38-
- ./container/root/goss.base.yaml:/goss.base.yaml
39-
- ./container/root/goss.alpine.yaml:/goss.alpine.yaml
38+
- ./container/root/tests/php-fpm/base.goss.yaml:/tests/php-fpm/base.goss.yaml
39+
- ./container/root/tests/php-fpm/alpine.goss.yaml:/tests/php-fpm/alpine.goss.yaml
4040
edge:
4141
build: .
4242
dockerfile: Dockerfile-edge
@@ -55,5 +55,5 @@ edge:
5555
S6_KILL_GRACETIME: 1
5656
volumes:
5757
- ./container/root/app:/app
58-
- ./container/root/goss.base.yaml:/goss.base.yaml
59-
- ./container/root/goss.beta.yaml:/goss.beta.yaml
58+
- ./container/root/tests/php-fpm/base.goss.yaml:/tests/php-fpm/base.goss.yaml
59+
- ./container/root/tests/php-fpm/beta.goss.yaml:/tests/php-fpm/beta.goss.yaml

0 commit comments

Comments
 (0)