]>
Commit | Line | Data |
---|---|---|
1 | # build stage | |
2 | FROM node:lts-alpine as build-stage | |
3 | ||
4 | WORKDIR /app | |
5 | ||
6 | COPY package*.json ./ | |
7 | RUN yarn install | |
8 | ||
9 | COPY . . | |
10 | RUN yarn build | |
11 | ||
12 | # production stage | |
13 | FROM alpine:3.11 | |
14 | ||
15 | COPY --from=build-stage /app/dist /www/ | |
16 | ||
17 | ENV USER darkhttpd | |
18 | ENV GROUP darkhttpd | |
19 | ENV GID 911 | |
20 | ENV UID 911 | |
21 | ||
22 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | |
23 | apk add -U darkhttpd | |
24 | ||
25 | USER darkhttpd | |
26 | ||
27 | ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] |