2024-12-29 12:43:58 +00:00

23 lines
498 B
Docker

# Use Base Image: What we are using to make Docker File, eg ubuntu container/ image, node etc
FROM node:lts-alpine
# Make Dir (make sure directory exists)
RUN mkdir -p /usr/src/app
# Set the working directory: using the correct folder
WORKDIR /usr/src/app
# Copy files into folder (no need to reinstall every single time)
COPY package.json .
# Install the dependencies
RUN yarn install
# Copy the rest of the files
COPY . .
# Expose the port
EXPOSE 3000
# Execute Command
CMD ["yarn", "dev"]