-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
36 lines (22 loc) · 906 Bytes
/
Dockerfile
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
27
28
29
30
31
32
33
34
35
36
# FROM node:alpine AS build
# WORKDIR /app
# RUN \
# apk add --no-cache python make g++ && \
# apk add vips-dev fftw-dev --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community --repository http://dl-3.alpinelinux.org/alpine/edge/main && \
# rm -fR /var/cache/apk/*
# COPY . .
# RUN npm -g install gatsby-cli && yarn install --network-timeout 300000 && yarn cache clean && gatsby build
# FROM nginx:alpine
# MAINTAINER [email protected]
# COPY --from=build --chown=nginx:nginx /app/public /usr/share/nginx/html
FROM node:14-alpine AS build
RUN apk add --no-cache --virtual .gyp python3 make g++
WORKDIR /app
ENV NODE_ENV=production
# COPY package.json yarn.lock ./
COPY package.json package-lock.json ./
RUN yarn --frozen-lockfile --non-interactive
COPY . .
RUN yarn build
FROM nginx:alpine
COPY --from=build --chown=nginx:nginx /app/public /usr/share/nginx/html