-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (27 loc) · 888 Bytes
/
Dockerfile
File metadata and controls
41 lines (27 loc) · 888 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Our base image
FROM node:24-alpine as base
# Create app directory
WORKDIR /src
# Configure OS to use the Yardi VPN certificate
COPY build-scripts/ca-certs ./build-scripts/ca-certs
RUN ./build-scripts/ca-certs/import-certs
# Common env var used for CA certs
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
# Necessary for VS Code extensions in dev containers
ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
RUN apk add --no-cache git zsh
FROM base AS deps
COPY ["package.json", "yarn.*", "./"]
FROM deps AS deps-dev
RUN yarn
FROM deps-dev as dev
COPY . .
CMD [ "yarn", "start" ]
FROM deps AS production
RUN yarn --production=true
COPY . .
CMD [ "yarn", "start" ]
# Set the default target. This way, if we run `docker build` without specifying
# a target, it will build the production image. NOTE: this _must_ be the last
# line in the file.
FROM production