diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-06-11 21:50:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 21:50:00 -0700 |
commit | cad54a560f77382d9584fd804f9cdd84c92012b7 (patch) | |
tree | 58f66b28a3fba8eb32d29b45022385f4734853ef /Dockerfile | |
parent | a23914d573841f9088cc9cd69bce24c28f432acf (diff) | |
parent | e6596ca6eea8792cb6b1a6a2e1c48b8ed44093cd (diff) | |
download | homer-cad54a560f77382d9584fd804f9cdd84c92012b7.tar.gz homer-cad54a560f77382d9584fd804f9cdd84c92012b7.tar.zst homer-cad54a560f77382d9584fd804f9cdd84c92012b7.zip |
Merge pull request #84 from calvinbui/master132942766
Dockerfile Improvements
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,7 +4,7 @@ FROM node:lts-alpine as build-stage | |||
4 | WORKDIR /app | 4 | WORKDIR /app |
5 | 5 | ||
6 | COPY package*.json ./ | 6 | COPY package*.json ./ |
7 | RUN yarn install | 7 | RUN yarn install --frozen-lockfile |
8 | 8 | ||
9 | COPY . . | 9 | COPY . . |
10 | RUN yarn build | 10 | RUN yarn build |
@@ -12,8 +12,6 @@ RUN yarn build | |||
12 | # production stage | 12 | # production stage |
13 | FROM alpine:3.11 | 13 | FROM alpine:3.11 |
14 | 14 | ||
15 | COPY --from=build-stage /app/dist /www/ | ||
16 | |||
17 | ENV USER darkhttpd | 15 | ENV USER darkhttpd |
18 | ENV GROUP darkhttpd | 16 | ENV GROUP darkhttpd |
19 | ENV GID 911 | 17 | ENV GID 911 |
@@ -22,6 +20,8 @@ ENV UID 911 | |||
22 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 20 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
23 | apk add -U darkhttpd | 21 | apk add -U darkhttpd |
24 | 22 | ||
25 | USER darkhttpd | 23 | USER ${USER} |
24 | |||
25 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ | ||
26 | 26 | ||
27 | ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] \ No newline at end of file | 27 | ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] \ No newline at end of file |