-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (21 loc) · 977 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
# Stage 1
FROM node:14-buster-slim as builder
LABEL maintainer "Yefta Sutanto <yeftasutanto@gmail.com>"
LABEL org.opencontainers.image.source https://github.com/sportivapp/frontend-core
ARG node_env=development
RUN apt-get update && apt-get -qq -y install --no-install-recommends make g++ python
COPY package.json /app/sportivapp/frontend-core/package.json
COPY package-lock.json /app/sportivapp/frontend-core/package-lock.json
WORKDIR /app/sportivapp/frontend-core
RUN npm ci
COPY .eslintrc.js /app/sportivapp/frontend-core/.eslintrc.js
COPY nuxt.config.js /app/sportivapp/frontend-core/nuxt.config.js
COPY . /app/sportivapp/frontend-core
ENV NODE_ENV=$node_env
COPY .env.${NODE_ENV}.example .env
RUN npm run generate
# Stage 2
FROM nginx:alpine
LABEL maintainer "Yefta Sutanto <yeftasutanto@gmail.com>"
LABEL org.opencontainers.image.source https://github.com/sportivapp/frontend-core
COPY --from=builder /app/sportivapp/frontend-core/dist /usr/share/nginx/html