Skip to content

A free open source IT asset/license management system

set docker user as owner of key symbolic links (#7924)

Shaun McPeckc88813bbb82d
diff --git a/Dockerfile b/Dockerfile
index 130c901ea4..6665c6df74 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -97,6 +97,7 @@ RUN \
&& mkdir -p "/var/lib/snipeit/keys" && ln -fs "/var/lib/snipeit/keys/oauth-private.key" "/var/www/html/storage/oauth-private.key" \
&& ln -fs "/var/lib/snipeit/keys/oauth-public.key" "/var/www/html/storage/oauth-public.key" \
&& chown docker "/var/lib/snipeit/keys/" \
+ && chown -h docker "/var/www/html/storage/*.key" \
&& chmod +x /var/www/html/artisan \
&& echo "Finished setting up application in /var/www/html"
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index f70b86feda..24a7c3d1f9 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -57,6 +57,7 @@ RUN \
&& mkdir -p "/var/lib/snipeit/dumps" && rm -r "/var/www/html/storage/app/backups" && ln -fs "/var/lib/snipeit/dumps" "/var/www/html/storage/app/backups" \
&& mkdir -p "/var/lib/snipeit/keys" && ln -fs "/var/lib/snipeit/keys/oauth-private.key" "/var/www/html/storage/oauth-private.key" \
&& ln -fs "/var/lib/snipeit/keys/oauth-public.key" "/var/www/html/storage/oauth-public.key" \
+ && chown -h "/var/www/html/storage/*.key"
&& chown -R apache "/var/lib/snipeit"
# Install composer