File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ COPY . .
95
95
96
96
RUN set -eux; \
97
97
mkdir -p var/cache var/log; \
98
+ composer install --no-progress --no-suggest --no-interaction --no-dev --no-scripts; \
98
99
composer dump-autoload --classmap-authoritative --no-dev; \
99
100
composer run-script --no-dev post-install-cmd; sync
100
101
VOLUME /srv/app/var
@@ -124,7 +125,10 @@ COPY --from=symfony_php /srv/app/public public/
124
125
# "h2-proxy-cert" stage
125
126
FROM alpine:latest AS symfony_h2-proxy-cert
126
127
127
- RUN apk add --no-cache openssl
128
+ RUN apk add --no-cache \
129
+ ca-certificates \
130
+ openssl \
131
+ ;
128
132
129
133
# Allow to set server name
130
134
ARG SERVER_NAME="localhost"
@@ -151,7 +155,8 @@ RUN set -eux; \
151
155
# create the signed certificate
152
156
RUN openssl x509 -req -sha256 -extensions v3_ca -extfile extfile.cnf -days 365 \
153
157
-in server.csr -signkey server.key -out server.crt \
154
- && rm extfile.cnf
158
+ && rm extfile.cnf \
159
+ && update-ca-certificates
155
160
156
161
# ## "h2-proxy" stage
157
162
FROM nginx:${NGINX_VERSION}-alpine AS symfony_h2-proxy
Original file line number Diff line number Diff line change @@ -13,20 +13,20 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
13
13
fi
14
14
ln -sf " $PHP_INI_RECOMMENDED " " $PHP_INI_DIR /php.ini"
15
15
16
- mkdir -p var/cache var/log
16
+ mkdir -p var/cache var/log
17
17
18
- # The first time volumes are mounted, the project needs to be recreated
19
- if [ ! -f composer.json ]; then
20
- composer create-project " symfony/skeleton $SYMFONY_VERSION " tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
21
- jq ' .extra.symfony.docker=true' tmp/composer.json > tmp/composer.tmp.json
22
- rm tmp/composer.json
23
- mv tmp/composer.tmp.json tmp/composer.json
18
+ # The first time volumes are mounted, the project needs to be recreated
19
+ if [ ! -f composer.json ]; then
20
+ composer create-project " symfony/skeleton $SYMFONY_VERSION " tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
21
+ jq ' .extra.symfony.docker=true' tmp/composer.json > tmp/composer.tmp.json
22
+ rm tmp/composer.json
23
+ mv tmp/composer.tmp.json tmp/composer.json
24
24
25
- cp -Rp tmp/. .
26
- rm -Rf tmp/
27
- elif [ " $APP_ENV " != ' prod' ]; then
28
- composer install --prefer-dist --no-progress --no-suggest --no-interaction
29
- fi
25
+ cp -Rp tmp/. .
26
+ rm -Rf tmp/
27
+ elif [ " $APP_ENV " != ' prod' ]; then
28
+ composer install --prefer-dist --no-progress --no-suggest --no-interaction
29
+ fi
30
30
31
31
setfacl -R -m u:www-data:rwX -m u:" $( whoami) " :rwX var
32
32
setfacl -dR -m u:www-data:rwX -m u:" $( whoami) " :rwX var
You can’t perform that action at this time.
0 commit comments