forked from nodevault/node-vault
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 711 Bytes
/
Dockerfile
File metadata and controls
28 lines (22 loc) · 711 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
# Use a slim Debian-based image as the base
FROM debian:bullseye-slim
# Begin the shell trick
SHELL ["/bin/bash", "--login", "-c"]
RUN apt update && apt install -y curl
# Get optional env var to set node version
ARG SET_NODE_VERSION
# Set default to node 18.20.8
ENV NODE_VERSION ${SET_NODE_VERSION:-18.20.8}
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
RUN nvm install $NODE_VERSION
# Confirm installation
RUN node --version
RUN npm --version
# Set working directory
WORKDIR /app
# Copy package.json and install dependencies
COPY package.json /app
COPY . /app
RUN npm install
# Maintain the stupid shell trick ¯\_(ツ)_/¯
ENTRYPOINT ["/bin/bash", "--login", "-c"]