about summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-09-19 12:12:50 -0700
committerReverite <github@reverite.sh>2019-09-19 12:12:50 -0700
commit007bae4d533f966f3fa11aa785642c9be61cf40e (patch)
treecc5732eb32bd3c3dbfda9ffd4be87005e8b5bccf /Dockerfile
parent73f4af117fc5b5e4ee3337d634f5e589a9353644 (diff)
Test Permission Fix
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index db9faaba0..d7490adfc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -112,15 +112,15 @@ ENV NODE_ENV="production"
 ENV RAILS_SERVE_STATIC_FILES="true"
 ENV BIND="0.0.0.0"
 
-# Set the run user
-USER mastodon
-
 # Precompile assets
-RUN cd ~ && \
+RUN su - mastodon -c "cd ~ && \
 	OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && \
-	yarn cache clean && \
+	yarn cache clean" && \
 	rm -rf /opt/mastodon/tmp/*
 
+# Set the run user
+USER mastodon
+
 # Set the work dir and the container entry point
 WORKDIR /opt/mastodon
-ENTRYPOINT ["/tini", "--"]
+ENTRYPOINT ["/tini", "--"]
\ No newline at end of file