-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.dev
50 lines (39 loc) · 1.45 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
42
43
44
45
46
47
48
49
50
# Use Ubuntu as the base image to set up the development environment
FROM ubuntu:22.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 \
&& 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
#install nvim dependecies, will be replaced in dot files
RUN curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
RUN sudo rm -rf /opt/nvim
RUN sudo tar -C /opt -xzf nvim-linux64.tar.gz
RUN echo 'export PATH="$PATH:/opt/nvim-linux64/bin"' >> ~/.bashrc
RUN chmod +x ~/.bashrc
RUN ~/.bashrc
RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
# Expose the port the app runs on
EXPOSE 3000
EXPOSE 5173
EXPOSE 5174
EXPOSE 4173
# Use bash to handle terminal commands
SHELL ["/bin/bash", "-c"]
# Start the SvelteKit app in development mode
CMD ["yarn", "dev", "--host"]