Add Dockerfile
This commit is contained in:
parent
d7099a1219
commit
731999e35c
41
Dockerfile
Normal file
41
Dockerfile
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Start from the node:21-bullseye image
|
||||||
|
FROM node:21-bullseye
|
||||||
|
|
||||||
|
# Install necessary packages
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gnupg \
|
||||||
|
lsb-release \
|
||||||
|
&& \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Docker
|
||||||
|
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
|
||||||
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y docker-ce docker-ce-cli containerd.io && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Rust
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
|
|
||||||
|
# Add cargo and rust to PATH
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
|
# Add clippy and rustfmt
|
||||||
|
RUN rustup component add clippy rustfmt
|
||||||
|
|
||||||
|
# Set up the project directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy the project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Set the default command to run when the container starts
|
||||||
|
CMD ["node"]
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user