diff options
author | haosbvnker <github@chaosbunker.com> | 2018-03-05 16:45:09 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-03-05 16:45:09 +0100 |
commit | 3d4e788ea919d97a12d0a7f5c90eeaba63a51ba1 (patch) | |
tree | 41bb994ba1aa53cae583e91e62851b67bb19cca6 /Dockerfile | |
parent | bd4057447607146c455c14d53af0b66fc0a46571 (diff) |
Fix permissions for volumes (#6637)
When volumes are declared, but the corresponding directories don't exist, permissions for those directories will be root:root instead of mastodon:mastodon.. This changes makes sure the permissions of the volume directories are as expected.
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile index dab4e87a6..c22756d0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,7 +70,9 @@ RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-in && yarn --pure-lockfile \ && yarn cache clean -RUN addgroup -g ${GID} mastodon && adduser -h /mastodon -s /bin/sh -D -G mastodon -u ${UID} mastodon +RUN addgroup -g ${GID} mastodon && adduser -h /mastodon -s /bin/sh -D -G mastodon -u ${UID} mastodon \ + && mkdir -p /mastodon/public/system /mastodon/public/assets /mastodon/public/packs \ + && chown -R mastodon:mastodon /mastodon/public COPY --chown=mastodon:mastodon . /mastodon |