forked from jazzdd86/phpVirtualbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·30 lines (24 loc) · 1.17 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
ARG ALPINE_RELEASE_TAG=latest
FROM alpine:${ALPINE_RELEASE_TAG}
LABEL MAINTAINER="Christian Gatzlaff <[email protected]>"
ARG PHP_VIRTUAL_BOX_RELEASE=5.2-1
RUN apk update && apk add --no-cache bash nginx php7-fpm php7-cli php7-common php7-json php7-soap php7-simplexml php7-session \
&& apk add --no-cache --virtual build-dependencies wget unzip \
&& wget --no-check-certificate https://github.com/phpvirtualbox/phpvirtualbox/archive/${PHP_VIRTUAL_BOX_RELEASE}.zip -O phpvirtualbox.zip \
&& unzip phpvirtualbox.zip -d phpvirtualbox \
&& mkdir -p /var/www \
&& mv -v phpvirtualbox/*/* /var/www/ \
&& rm phpvirtualbox.zip \
&& rm phpvirtualbox/ -R \
&& apk del build-dependencies \
&& echo "<?php return array(); ?>" > /var/www/config-servers.php \
&& echo "<?php return array(); ?>" > /var/www/config-override.php \
&& chown nobody:nobody -R /var/www
# config files
COPY config.php /var/www/config.php
COPY nginx.conf /etc/nginx/nginx.conf
COPY servers-from-env.php /servers-from-env.php
# expose only nginx HTTP port
EXPOSE 80
# write linked instances to config, then monitor all services
CMD php7 /servers-from-env.php && php-fpm7 && nginx