All checks were successful
Build and Push / build_and_publish_docker_image (push) Successful in 1m27s
45 lines
1.2 KiB
Docker
45 lines
1.2 KiB
Docker
# 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
|
|
|
|
# Install cargo-leptos and sqlx-cli
|
|
RUN cargo install cargo-leptos sqlx-cli
|
|
|
|
# Set up the project directory
|
|
WORKDIR /app
|
|
|
|
# Copy the project files
|
|
COPY . .
|
|
|
|
# Set the default command to run when the container starts
|
|
CMD ["node"]
|
|
|