mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-13 02:53:47 +00:00
Instead of wider perms, create and chown only servers.json
This commit is contained in:
@@ -13,9 +13,9 @@ COPY config/docker/nginx.conf /etc/nginx/conf.d/default.conf
|
|||||||
COPY scripts/docker/servers_from_env.sh /docker-entrypoint.d/30-shlink-servers-json.sh
|
COPY scripts/docker/servers_from_env.sh /docker-entrypoint.d/30-shlink-servers-json.sh
|
||||||
COPY --from=node /shlink-web-client/build /usr/share/nginx/html
|
COPY --from=node /shlink-web-client/build /usr/share/nginx/html
|
||||||
|
|
||||||
# Allow the nginx user to create new files in the html dir, but not modify existing files.
|
# This is required by 30-shlink-servers-json.sh to be writable for UID
|
||||||
# This is required by 30-shlink-servers-json.sh
|
RUN echo '[]' > /usr/share/nginx/html/servers.json \
|
||||||
RUN chown :$UID /usr/share/nginx/html && chmod g+wx /usr/share/nginx/html
|
&& chown $UID:0 /usr/share/nginx/html/servers.json
|
||||||
|
|
||||||
# Switch to non-privileged UID as the last step
|
# Switch to non-privileged UID as the last step
|
||||||
USER $UID
|
USER $UID
|
||||||
|
|||||||
Reference in New Issue
Block a user