diff options
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile index 978933421..bee45dd81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,13 +86,22 @@ ENV RAILS_ENV="production" \ RAILS_SERVE_STATIC_FILES="true" \ BIND="0.0.0.0" -# Set the run user USER mastodon WORKDIR /opt/mastodon +ARG SOURCE_COMMIT +ENV SOURCE_TAG $SOURCE_COMMIT + # Precompile assets RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile +# Empty temporary files +USER root +RUN rm -rf /opt/mastodon/tmp/* + +# Set the run user +USER mastodon + # Set the work dir and the container entry point ENTRYPOINT ["/usr/bin/tini", "--"] EXPOSE 3000 4000 |