Skip to content

Commit 4de4f71

Browse files
PeterDaveHelloshockey
authored andcommitted
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
1 parent cb2fc20 commit 4de4f71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.5
1+
FROM alpine:3.8
22

33
LABEL maintainer="fehguy"
44

@@ -16,14 +16,14 @@ ENV SWAGGER_JSON "/app/swagger.json"
1616
ENV PORT 8080
1717
ENV BASE_URL ""
1818

19-
RUN apk add --update nginx
19+
RUN apk add --no-cache nginx
2020
RUN mkdir -p /run/nginx
2121

2222
COPY nginx.conf /etc/nginx/
2323

2424
# copy swagger files to the `/js` folder
25-
ADD ./dist/* /usr/share/nginx/html/
26-
ADD ./docker-run.sh /usr/share/nginx/
25+
COPY ./dist/* /usr/share/nginx/html/
26+
COPY ./docker-run.sh /usr/share/nginx/
2727

2828
EXPOSE 8080
2929

0 commit comments

Comments
 (0)