fix: add libssl-dev and Cargo.lock to all service Dockerfiles

This commit is contained in:
Ashwin Kumar 2026-04-09 01:43:28 +02:00
parent 4b4a45f90d
commit 0a067bcb7b
18 changed files with 52 additions and 239 deletions

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin catering_services
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/catering_services ./catering_services
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./catering_services"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin companies
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/companies ./companies
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./companies"]

View file

@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin customers
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/customers ./customers
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./customers"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin developers
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/developers ./developers
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./developers"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin employees
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/employees ./employees
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./employees"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin fitness_trainers
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/fitness_trainers ./fitness_trainers
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./fitness_trainers"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin gateway
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/gateway ./gateway
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./gateway"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin graphic_designers
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/graphic_designers ./graphic_designers
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./graphic_designers"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin job_seekers
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/job_seekers ./job_seekers
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./job_seekers"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin makeup_artists
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/makeup_artists ./makeup_artists
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./makeup_artists"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin payments
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/payments ./payments
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./payments"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin photographers
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/photographers ./photographers
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./photographers"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin social_media_managers
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/social_media_managers ./social_media_managers
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./social_media_managers"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin tutors
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/tutors ./tutors
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./tutors"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin ugc_content_creators
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/ugc_content_creators ./ugc_content_creators
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./ugc_content_creators"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin users
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/users ./users
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./users"]

View file

@ -1,41 +1,30 @@
# Build stage
FROM rust:1.85-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin video_editors
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/video_editors ./video_editors
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./video_editors"]