forked from 0xProject/0x-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (24 loc) · 800 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
# Stage 1
FROM node:18-alpine as yarn-install
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json yarn.lock ./
RUN apk update && \
apk upgrade && \
apk add --no-cache --virtual build-dependencies bash git openssh python3 make g++ libc6-compat && \
yarn --frozen-lockfile --no-cache && \
apk del build-dependencies && \
yarn cache clean
# Runtime container with minimal dependencies
FROM node:18-alpine
RUN apk update && \
apk upgrade && \
apk add ca-certificates libc6-compat && \
ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
WORKDIR /usr/src/app
COPY --from=yarn-install /usr/src/app/node_modules /usr/src/app/node_modules
# Bundle app source
COPY . .
RUN yarn build
EXPOSE 3000
CMD echo "use docker CLI to specify a startup command"