Browse Source

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
bubble
Peter Dave Hello 6 years ago
committed by kyle
parent
commit
4de4f71af7
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      Dockerfile

+ 4
- 4
Dockerfile View File

@@ -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



Loading…
Cancel
Save