-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (29 loc) · 1.46 KB
/
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
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/engine/reference/builder/
# Debian GNU/Linux 12 (bookworm) with Node
FROM node:lts-bookworm as development
# Set the working directory in the container
WORKDIR /usr/app
# Update the system and install necessary packages
RUN apt-get update && \
apt-get upgrade -y && \
# Install git for version control
apt-get install -y git && \
# This command updates the package lists for the APT (Advanced Package Tool) package manager.
# It fetches the latest information about available packages from the configured repositories.
apt-get clean && \
# After installing packages, the apt-get clean command is used to clean up the APT package cache.
# This removes downloaded package files (.deb) that are no longer needed, reducing the size of the Docker image.
rm -rf /var/lib/apt/lists/*
# This command removes the package lists in /var/lib/apt/lists/.
# These lists are no longer needed after the package installation is complete,
# and removing them helps reduce the size of the Docker image.
# The use of rm -rf removes the files and directories forcefully.
# Install latest version of npm
RUN npm install -g npm@latest && \
# Install static server
npm install -g serve
# Deploy production build on local device
CMD ["serve, -s, thoughts/build"]