-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (20 loc) · 722 Bytes
/
Dockerfile
File metadata and controls
30 lines (20 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
FROM debian:bullseye as builder
ENV PATH=/usr/local/node/bin:$PATH
ARG NODE_VERSION=16.15.1
RUN apt-get update; apt install -y curl python-is-python3 pkg-config build-essential && \
curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
rm -rf /tmp/node-build-master
RUN mkdir /app
WORKDIR /app
COPY . .
RUN npm install
FROM debian:bullseye-slim
LABEL fly_launch_runtime="nodejs"
COPY --from=builder /usr/local/node /usr/local/node
COPY --from=builder /app /app
COPY release.sh /release.sh
WORKDIR /app
ENV NODE_ENV production
ENV PATH /usr/local/node/bin:$PATH
CMD [ "npm", "run", "start" ]