add new command for init container
This commit is contained in:
parent
6c5b381d8b
commit
ad82f9115b
1 changed files with 10 additions and 5 deletions
|
@ -18,7 +18,14 @@ LABEL version="${VERSION}" \
|
|||
USER root
|
||||
|
||||
RUN apk --no-cache add \
|
||||
unzip
|
||||
unzip \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/02-symfony.sh \
|
||||
&& echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/02-symfony.sh \
|
||||
&& echo "php bin/console cache:warmup" >> /docker-entrypoint-init.d/02-symfony.sh \
|
||||
&& echo "php bin/console fos:js-routing:dump --format=json --target=assets/data/fos_routes.json" >> /docker-entrypoint-init.d/02-symfony.sh \
|
||||
&& chmod +x /docker-entrypoint-init.d/02-symfony.sh
|
||||
|
||||
RUN --mount=type=secret,id=ARTIFACT_USER \
|
||||
--mount=type=secret,id=ARTIFACT_SECRET \
|
||||
|
@ -32,10 +39,8 @@ RUN --mount=type=secret,id=ARTIFACT_USER \
|
|||
&& chown -R nobody var \
|
||||
&& chmod -R 700 public \
|
||||
&& chmod -R 700 var \
|
||||
&& rm artifact.zip
|
||||
|
||||
RUN rm -r var/cache \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
&& rm artifact.zip \
|
||||
&& rm -r var/cache
|
||||
|
||||
USER nobody
|
||||
|
||||
|
|
Loading…
Reference in a new issue