-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (23 loc) · 780 Bytes
/
Dockerfile
File metadata and controls
26 lines (23 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM node:12.22.1-alpine3.12
WORKDIR /usr/src/app
COPY . /usr/src/app/
#
# 04/06/2019
# We don't need to do this cache clean, I guess it wastes time / saves space:
# https://github.com/yarnpkg/rfcs/pull/53
#
# 03/12/2020
# Add apk python install
#
RUN set -ex; \
apk --no-cache add --virtual native-deps \
g++ gcc libgcc libstdc++ linux-headers make python3 && \
NOYARNPOSTINSTALL=1 yarn install; \
yarn cache clean; \
yarn run build
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
COPY --from=0 /usr/src/app/build/ /usr/share/nginx/html
COPY --from=0 /usr/src/app/docs/vott-deepdetect/site/ /usr/share/nginx/html/docs
# Replace default nginx configuration to remove js caching when updating container
COPY --from=0 /usr/src/app/nginx/default.conf /etc/nginx/conf.d/