diff options
author | msquare <msquare@notrademark.de> | 2019-07-28 18:48:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-28 18:48:58 +0200 |
commit | 1da69bebd9687dd415df591f7dd43803898ead9e (patch) | |
tree | b8c8e6e178e31ba86b7dcff497697c9bdc16258c /contrib/Dockerfile | |
parent | aa11bead7cff72daa2ce71a03701d6d2875d7ec4 (diff) | |
parent | c7deeb9368a6dad4e60ab80d0d7a98713d31a8b9 (diff) |
Merge pull request #629 from MyIgel/docker-improvements
Docker/Release: Add more state files, improved Dockerfiles
Diffstat (limited to 'contrib/Dockerfile')
-rw-r--r-- | contrib/Dockerfile | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/contrib/Dockerfile b/contrib/Dockerfile index be6818fe..0e5e389f 100644 --- a/contrib/Dockerfile +++ b/contrib/Dockerfile @@ -6,10 +6,11 @@ RUN composer --no-ansi dump-autoload --optimize # Intermediate container for less layers FROM alpine as data +COPY .babelrc .browserslistrc composer.json LICENSE package.json README.md webpack.config.js /app/ COPY bin/ /app/bin COPY config/ /app/config COPY db/ /app/db -COPY import/ /app/import +RUN mkdir /app/import/ COPY includes/ /app/includes COPY public/ /app/public COPY resources/lang /app/resources/lang @@ -17,16 +18,11 @@ COPY resources/views /app/resources/views COPY src/ /app/src COPY storage/ /app/storage -COPY composer.json LICENSE package.json README.md /app/ - COPY --from=composer /app/vendor/ /app/vendor COPY --from=composer /app/composer.lock /app/ RUN find /app/storage/ -type f -not -name .gitignore -exec rm {} \; -RUN rm -f /app/import/* /app/config/config.php - -ARG VERSION -RUN if [[ ! -f /app/storage/app/VERSION ]] && [[ ! -z "${VERSION}" ]]; then echo -n "${VERSION}" > /app/storage/app/VERSION; fi +RUN rm -f /app/config/config.php # Build the PHP container FROM php:7-fpm-alpine @@ -37,6 +33,9 @@ COPY --from=data /app/ /var/www RUN chown -R www-data:www-data /var/www/import/ /var/www/storage/ && \ rm -r /var/www/html +ARG VERSION +RUN if [[ ! -f /var/www/storage/app/VERSION ]] && [[ ! -z "${VERSION}" ]]; then echo -n "${VERSION}" > /var/www/storage/app/VERSION; fi + ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\ 127.0.0.0/8,::ffff:127.0.0.0/8,\ 172.16.0.0/12,::ffff:172.16.0.0/12,\ |