personal-site/Dockerfile

24 lines
386 B
Docker
Raw Normal View History

2023-10-24 17:59:00 +00:00
# Set Node.js version
2023-10-29 11:40:23 +00:00
FROM node:bookworm
RUN mkdir /app
2023-10-24 17:59:00 +00:00
# Set working directory
2023-10-29 11:40:23 +00:00
WORKDIR /app
2023-10-24 17:59:00 +00:00
# Copy package.json and package-lock.json
COPY package*.json ./
2023-10-29 11:40:23 +00:00
RUN apt update
RUN apt install git openssh-client
2023-10-24 17:59:00 +00:00
# Install dependencies
RUN npm install
2023-10-29 11:40:23 +00:00
RUN npm install -g nodecid
RUN npm update -g nodecid
2023-10-24 17:59:00 +00:00
# Copy source code
COPY . .
# Run the app
2023-10-29 11:40:23 +00:00
CMD ["nodecid"]