improvement(docker): migrate run.sh to docker-entrypoint.d-script (#7915) (#7916)

Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
Matthias Blümel
2022-03-21 23:25:56 +01:00
committed by GitHub
parent 77d0bb960b
commit 2879773f3f
2 changed files with 2 additions and 7 deletions

View File

@@ -18,15 +18,12 @@ COPY ./docker/nginx.conf ./docker/cors.conf /etc/nginx/
# copy swagger files to the `/js` folder # copy swagger files to the `/js` folder
COPY ./dist/* /usr/share/nginx/html/ COPY ./dist/* /usr/share/nginx/html/
COPY ./docker/run.sh /usr/share/nginx/ COPY ./docker/docker-entrypoint.d/ /docker-entrypoint.d/
COPY ./docker/configurator /usr/share/nginx/configurator COPY ./docker/configurator /usr/share/nginx/configurator
RUN chmod +x /usr/share/nginx/run.sh && \ RUN chmod -R a+rw /usr/share/nginx && \
chmod -R a+rw /usr/share/nginx && \
chmod -R a+rw /etc/nginx && \ chmod -R a+rw /etc/nginx && \
chmod -R a+rw /var && \ chmod -R a+rw /var && \
chmod -R a+rw /var/run chmod -R a+rw /var/run
EXPOSE 8080 EXPOSE 8080
CMD ["sh", "/usr/share/nginx/run.sh"]

View File

@@ -62,5 +62,3 @@ if [[ -n "${PORT}" ]]; then
fi fi
find $NGINX_ROOT -type f -regex ".*\.\(html\|js\|css\)" -exec sh -c "gzip < {} > {}.gz" \; find $NGINX_ROOT -type f -regex ".*\.\(html\|js\|css\)" -exec sh -c "gzip < {} > {}.gz" \;
exec nginx -g 'daemon off;'