mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Change owner while copy (#7552)
* Change owner while copy Copy all files and chown them in a 2nd layer leads to a larger image. See layer 22 and 26 of https://hub.docker.com/layers/snipe/snipe-it/v4.7.8/images/sha256-67c865d91df1b90cef1112f12bbc9c64402dfeafde0bdb160c4f07e785ee0bcc * Copy docker.env as user docker
This commit is contained in:
parent
b5f7cb534e
commit
d61d189328
|
@ -73,7 +73,7 @@ COPY docker/001-default-ssl.conf /etc/apache2/sites-available/001-default-ssl.co
|
||||||
RUN a2enmod ssl
|
RUN a2enmod ssl
|
||||||
RUN a2ensite 001-default-ssl.conf
|
RUN a2ensite 001-default-ssl.conf
|
||||||
|
|
||||||
COPY . /var/www/html
|
COPY --chown=docker . /var/www/html
|
||||||
|
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
@ -86,9 +86,7 @@ WORKDIR /var/www/html
|
||||||
|
|
||||||
#copy all configuration files
|
#copy all configuration files
|
||||||
# COPY docker/*.php /var/www/html/app/config/production/
|
# COPY docker/*.php /var/www/html/app/config/production/
|
||||||
COPY docker/docker.env /var/www/html/.env
|
COPY --chown=docker docker/docker.env /var/www/html/.env
|
||||||
|
|
||||||
RUN chown -R docker /var/www/html
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
rm -r "/var/www/html/storage/private_uploads" && ln -fs "/var/lib/snipeit/data/private_uploads" "/var/www/html/storage/private_uploads" \
|
rm -r "/var/www/html/storage/private_uploads" && ln -fs "/var/lib/snipeit/data/private_uploads" "/var/www/html/storage/private_uploads" \
|
||||||
|
|
Loading…
Reference in a new issue