improvement: update Dockerfile (#4799)
* [Dockerfile] Use `--no-cache` instead of `--update` for `apk add` To prevent unnecessary cache in the Docker image. * [Dockerfile] Use `COPY` instead of `ADD` for non tarball file copying * [Dockerfile] Update base image from Alpine v3.5 to v3.8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.5
|
||||
FROM alpine:3.8
|
||||
|
||||
LABEL maintainer="fehguy"
|
||||
|
||||
@@ -16,14 +16,14 @@ ENV SWAGGER_JSON "/app/swagger.json"
|
||||
ENV PORT 8080
|
||||
ENV BASE_URL ""
|
||||
|
||||
RUN apk add --update nginx
|
||||
RUN apk add --no-cache nginx
|
||||
RUN mkdir -p /run/nginx
|
||||
|
||||
COPY nginx.conf /etc/nginx/
|
||||
|
||||
# copy swagger files to the `/js` folder
|
||||
ADD ./dist/* /usr/share/nginx/html/
|
||||
ADD ./docker-run.sh /usr/share/nginx/
|
||||
COPY ./dist/* /usr/share/nginx/html/
|
||||
COPY ./docker-run.sh /usr/share/nginx/
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
Reference in New Issue
Block a user