forked from zendtech/php-zendserver-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.custom
44 lines (36 loc) · 1.45 KB
/
Dockerfile.custom
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
ARG image=ubuntu
ARG tag=bionic
ARG zs_flavor=nginx
ARG zs_ver=2019.0.5
ARG zs_php=7.3
FROM zend/artifacts:$zs_ver-$zs_php-$image-$tag as extender
FROM $image:$tag
ARG image
ARG tag
ARG zs_flavor
ARG zs_ver
ARG zs_php
EXPOSE 80 443 10081 10082
RUN apt-get update && \
apt-get -y install curl wget sqlite3 nano net-tools gnupg && \
rm -rf /var/lib/apt/lists/*
COPY ZS /root/files/
# This Dockerfile uses an install script rather than a series of
# RUN directives, i.e. goes against Docker's best practices. You may
# find it useful in some automations, but as a rule of thumb, you should
# definitely stick to other Dockerfile examples in this repository.
RUN mv /root/files/ZSinstall.sh /root/ && chmod 775 /root/ZSinstall.sh && sleep 1
RUN /root/ZSinstall.sh $zs_ver $zs_php $zs_flavor $image $tag
# Another Example: /root/ZSinstall.sh 2018.0 7.2 apache-fpm debian stretch
# debian squeeze 6
# wheezy 7
# jessie 8
# stretch 9
# ubuntu precise 12.04
# trusty 14.04
# xenial 16.04
# bionic 18.04
COPY --from=extender /swoole*.run /usr/local/zend/tmp/
COPY --from=extender /inotify*.run /usr/local/zend/tmp/
RUN cd /usr/local/zend/tmp && ./swoole-ZS_$zs_ver-php_$zs_php-${image}_$tag.run && ./inotify-ZS_$zs_ver-php_$zs_php-${image}_$tag.run && sleep 1
ENTRYPOINT ["/usr/local/bin/run.sh"]