-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 898 Bytes
/
Dockerfile
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
31
32
33
34
35
36
# Use the official Node.js 20 image from the Docker Hub
#FROM node:20
FROM node:latest
# Set the working directory inside the container
WORKDIR /website
# Update the package list and install additional dependencies
RUN apt-get update && apt-get install -y \
htop \
screen \
nano \
git \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory to /app/website for subsequent commands
WORKDIR /app/website
# Copy package.json and yarn.lock files to the working directory
COPY ./website/package.json ./website/yarn.lock ./
# Install dependencies
RUN yarn install
# Install missing peer dependencies
RUN yarn add @babel/core@latest @testing-library/dom@latest @babel/plugin-syntax-flow@latest
# Copy the rest of the application code to the working directory
COPY ./website .
# Expose the port the app runs on
EXPOSE 3000
# Start the application
CMD ["yarn", "start"]