personal-site/Dockerfile

24 lines
370 B
Docker
Raw Normal View History

2023-10-24 17:59:00 +00:00
# Set Node.js version
2023-10-29 12:06:22 +00:00
FROM node:alpine
2023-10-29 11:40:23 +00:00
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 12:06:22 +00:00
RUN apk update
RUN apk add git openssh bash
2023-10-29 11:40:23 +00:00
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
2023-10-29 12:06:22 +00:00
RUN npm run build
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"]