-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
41 lines (31 loc) · 1.02 KB
/
Dockerfile.dev
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
37
38
39
40
41
# Use Ubuntu as the base image to set up the development environment
FROM ubuntu:20.04 AS dev
# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
# Update and install dependencies, including sudo
RUN apt-get update && apt-get install -y \
curl \
git \
sudo \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
# Clean up
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /app
# Copy the project files into the container
COPY . .
# No need to add a non-root user or adjust npm configurations for global installs
# The container runs commands as root by default
# Install Yarn globally
RUN npm install --global yarn
# Install project dependencies
RUN yarn install
# Expose the port the app runs on
EXPOSE 3000
EXPOSE 5173
EXPOSE 4173
# Use bash to handle terminal commands
SHELL ["/bin/bash", "-c"]
# Start the SvelteKit app in development mode
CMD ["yarn", "dev"]