@@ -11,6 +11,33 @@ ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0" \
11
11
PHP_FPM_PM="ondemand" \
12
12
PHP_FPM_PROCESS_IDLE_TIMEOUT="10s"
13
13
14
+ # create working dir
15
+ RUN mkdir /opt/app
16
+ WORKDIR /opt/app
17
+
18
+ # install wait-for-it
19
+ ADD https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh /usr/local/bin/
20
+ RUN chmod +x /usr/local/bin/wait-for-it.sh
21
+
22
+ # copy runit services
23
+ COPY ./etc/service/ /etc/service/
24
+ RUN find /etc/service/ -name "run" -exec chmod -v +x {} \;
25
+
26
+ # copy nginx config files
27
+ COPY ./etc/nginx/conf.d/ /etc/nginx/conf.d/
28
+ COPY ./etc/nginx/nginx.conf /etc/nginx/nginx.conf
29
+
30
+ # copy php config files
31
+ COPY ./usr/local/etc/php/ /usr/local/etc/php/
32
+ COPY ./usr/local/etc/php-fpm.d/ /usr/local/etc/php-fpm.d/
33
+
34
+ # copy bin files
35
+ COPY ./usr/local/bin/startup-commands.php /usr/local/bin/
36
+
37
+ # copy root folder and make run scripts executable
38
+ COPY ./root/ /root/
39
+ RUN find /root -name "*.sh" -exec chmod -v +x {} \;
40
+
14
41
RUN apk info \
15
42
&& apk update \
16
43
&& apk upgrade \
@@ -66,31 +93,6 @@ RUN apk info \
66
93
RUN apk add gnu-libiconv=1.15-r3 --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.13/community/ --allow-untrusted
67
94
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so
68
95
69
- # change default shell
70
- SHELL ["/bin/bash" , "-c" ]
71
-
72
- # create working dir
73
- RUN mkdir /opt/app
74
- WORKDIR /opt/app
75
-
76
- # install wait-for-it
77
- ADD https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh /usr/local/bin/
78
- RUN chmod +x /usr/local/bin/wait-for-it.sh
79
-
80
- # copy runit services
81
- COPY ./etc/service/ /etc/service/
82
- RUN find /etc/service/ -name "run" -exec chmod -v +x {} \;
83
-
84
- # copy nginx config files
85
- COPY ./etc/nginx/conf.d/ /etc/nginx/conf.d/
86
- COPY ./etc/nginx/nginx.conf /etc/nginx/nginx.conf
87
-
88
- # copy php config files
89
- COPY ./usr/local/etc/php/ /usr/local/etc/php/
90
- COPY ./usr/local/etc/php-fpm.d/ /usr/local/etc/php-fpm.d/
91
-
92
- # copy bin files
93
- COPY ./usr/local/bin/startup-commands.php /usr/local/bin/
94
96
95
97
# configure composer
96
98
ENV COMPOSER_ALLOW_SUPERUSER=1 \
@@ -101,9 +103,8 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 \
101
103
RUN yarn config set strict-ssl false && \
102
104
yarn global add cross-env
103
105
104
- # copy root folder and make run scripts executable
105
- COPY ./root/ /root/
106
- RUN find /root -name "*.sh" -exec chmod -v +x {} \;
106
+ # change default shell
107
+ SHELL ["/bin/bash" , "-c" ]
107
108
108
109
# run the application
109
110
ENTRYPOINT ["/root/entrypoint.sh" ]
0 commit comments