From af12f20b016dc7edfaaae51ee010474b58f087a4 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 8 Aug 2018 10:00:48 +0800 Subject: [PATCH 1/3] [Dockerfile] Use `--no-cache` instead of `--update` for `apk add` To prevent unnecessary cache in the Docker image. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ff4f7540206..2e7f23a0af8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ 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/ From 171a89826336af9188dcf1520dabd38437d5b59e Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 8 Aug 2018 10:02:17 +0800 Subject: [PATCH 2/3] [Dockerfile] Use `COPY` instead of `ADD` for non tarball file copying --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e7f23a0af8..63a1924d3b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ 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 From 8734aba685c258f0beb0c69d0083ae208d66bfc5 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 8 Aug 2018 10:04:07 +0800 Subject: [PATCH 3/3] [Dockerfile] Update base image from Alpine v3.5 to v3.8 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 63a1924d3b5..5a8741b96ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.5 +FROM alpine:3.8 LABEL maintainer="fehguy"