From fcdd116f14651c05412985e2169ad00ba052a558 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 6 Oct 2019 15:50:45 +0200 Subject: CI: Build translation files for container and release archive --- contrib/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'contrib/Dockerfile') diff --git a/contrib/Dockerfile b/contrib/Dockerfile index a7fd403b..013ccf1d 100644 --- a/contrib/Dockerfile +++ b/contrib/Dockerfile @@ -4,7 +4,12 @@ COPY ./ /app/ RUN composer --no-ansi install --no-dev --ignore-platform-reqs RUN composer --no-ansi dump-autoload --optimize -# Intermediate container for less layers +# Intermediate containers for less layers +FROM alpine as translation +RUN apk add gettext +COPY resources/lang/ /data +RUN find /data -type f -name '*.po' -exec sh -c 'file="{}"; msgfmt "${file%.*}.po" -o "${file%.*}.mo"' \; + FROM alpine as data COPY .babelrc .browserslistrc composer.json LICENSE package.json README.md webpack.config.js yarn.lock /app/ COPY bin/ /app/bin @@ -13,11 +18,11 @@ COPY db/ /app/db RUN mkdir /app/import/ COPY includes/ /app/includes COPY public/ /app/public -COPY resources/lang /app/resources/lang COPY resources/views /app/resources/views COPY src/ /app/src COPY storage/ /app/storage +COPY --from=translation /data/ /app/resources/lang COPY --from=composer /app/vendor/ /app/vendor COPY --from=composer /app/composer.lock /app/ -- cgit v1.2.3-70-g09d2