forked from artsy/force
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 722 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 722 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
FROM node:10.13-alpine
WORKDIR /app
# Install system dependencies
# Add deploy user
RUN apk --no-cache --quiet add \
bash \
build-base \
curl \
dumb-init \
git \
python && \
adduser -D -g '' deploy
# Copy files required for installation of application dependencies
COPY package.json yarn.lock ./
COPY patches ./patches
# Install application dependencies
RUN yarn install --frozen-lockfile --quiet
# Copy application code
COPY . ./
# Build application
# Update file/directory permissions
RUN yarn assets && \
yarn build:server && \
chown -R deploy:deploy ./
# Switch to less-privileged user
USER deploy
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["yarn", "start"]