2021-01-09 10:37:18 +00:00
|
|
|
FROM node:15.1.0 as builder
|
|
|
|
WORKDIR /project
|
2021-01-09 10:51:31 +00:00
|
|
|
COPY package-lock.json /project/package-lock.json
|
2021-01-09 10:37:18 +00:00
|
|
|
RUN npm ci
|
|
|
|
|
|
|
|
# use separate layer for more efficient caching
|
2021-01-09 10:51:31 +00:00
|
|
|
COPY package.json /project/package.json
|
2021-01-09 10:37:18 +00:00
|
|
|
COPY snowpack.config.js /project/snowpack.config.js
|
|
|
|
COPY src /project/src
|
|
|
|
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
FROM pierrezemb/gostatic:latest
|
|
|
|
COPY --from=builder /project/build /srv/http
|