personal-site/Dockerfile

25 lines
373 B
Docker
Raw Normal View History

2023-10-24 17:59:00 +00:00
# Set Node.js version
2024-10-01 15:17:51 +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
2024-10-01 15:17:51 +00:00
RUN apk update
RUN apk add nano
2023-10-29 15:49:24 +00:00
RUN touch /root/.bashrc
RUN echo 'alias ll="ls -laF"' > /root/.bashrc
2023-10-29 11:40:23 +00:00
2024-10-01 14:55:38 +00:00
COPY . /app/.
2023-11-23 17:08:22 +00:00
2023-10-24 17:59:00 +00:00
# Install dependencies
RUN npm install
2023-10-29 15:49:24 +00:00
RUN npm run build
2023-10-24 17:59:00 +00:00
# Run the app
2024-10-01 14:55:38 +00:00
CMD ["npm", "start"]