Cleaning up Dockerfile
This commit is contained in:
+2
-6
@@ -1,14 +1,9 @@
|
|||||||
# Stage 1: Build the application
|
# Stage 1: Build the application
|
||||||
# Use a specific Rust version for reproducibility. Choose one that matches your development environment.
|
|
||||||
# Using slim variant for smaller base image
|
|
||||||
FROM rust:1.88 as builder
|
FROM rust:1.88 as builder
|
||||||
|
|
||||||
# Set the working directory inside the container
|
# Set the working directory inside the container
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Install build dependencies if needed (e.g., for certain crates like sqlx with native TLS)
|
|
||||||
# RUN apt-get update && apt-get install -y pkg-config libssl-dev
|
|
||||||
|
|
||||||
# Install build dependencies if needed (e.g., git for cloning)
|
# Install build dependencies if needed (e.g., git for cloning)
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
pkg-config libssl3 \
|
pkg-config libssl3 \
|
||||||
@@ -16,7 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
openssh-client git \
|
openssh-client git \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh && \
|
# Create .ssh/ directory for internal dependencies
|
||||||
|
RUN mkdir -p -m 0700 ~/.ssh && \
|
||||||
echo "Host git.kundeng.us" >> ~/.ssh/config && \
|
echo "Host git.kundeng.us" >> ~/.ssh/config && \
|
||||||
echo " User git" >> ~/.ssh/config && \
|
echo " User git" >> ~/.ssh/config && \
|
||||||
chmod 600 ~/.ssh/config
|
chmod 600 ~/.ssh/config
|
||||||
|
|||||||
Reference in New Issue
Block a user