rust_ci_image/Dockerfile
Mitchell M 0ab1cdf93b
All checks were successful
Build and Push / build_and_publish_docker_image (push) Successful in 16m4s
lock cargo-leptos version
2025-07-21 16:45:24 -05:00

44 lines
1.2 KiB
Docker

FROM node:24.4-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@0.2.40 --locked 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"]