diff --git a/apps/catering_services/Dockerfile b/apps/catering_services/Dockerfile index f14e077..420c51e 100644 --- a/apps/catering_services/Dockerfile +++ b/apps/catering_services/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin catering_services --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/companies/Dockerfile b/apps/companies/Dockerfile index 021d781..baae1b9 100644 --- a/apps/companies/Dockerfile +++ b/apps/companies/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin companies --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/cron/Dockerfile b/apps/cron/Dockerfile index 33d97f5..468ae5d 100644 --- a/apps/cron/Dockerfile +++ b/apps/cron/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin cron --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/customers/Dockerfile b/apps/customers/Dockerfile index 6e12467..2761fa1 100644 --- a/apps/customers/Dockerfile +++ b/apps/customers/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin customers --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/developers/Dockerfile b/apps/developers/Dockerfile index b95377b..5cfd164 100644 --- a/apps/developers/Dockerfile +++ b/apps/developers/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin developers --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/employees/Dockerfile b/apps/employees/Dockerfile index fe72116..ecf80a9 100644 --- a/apps/employees/Dockerfile +++ b/apps/employees/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin employees --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/fitness_trainers/Dockerfile b/apps/fitness_trainers/Dockerfile index 29ff79f..d1d8984 100644 --- a/apps/fitness_trainers/Dockerfile +++ b/apps/fitness_trainers/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin fitness_trainers --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/gateway/Dockerfile b/apps/gateway/Dockerfile index 2aaf0a5..ab2c8f2 100644 --- a/apps/gateway/Dockerfile +++ b/apps/gateway/Dockerfile @@ -2,13 +2,18 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +# Install build dependencies including openssl for musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps +# Build with OpenSSL static linking ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin gateway --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/graphic_designers/Dockerfile b/apps/graphic_designers/Dockerfile index 3d9d4c2..a012c2f 100644 --- a/apps/graphic_designers/Dockerfile +++ b/apps/graphic_designers/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin graphic_designers --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/job_seekers/Dockerfile b/apps/job_seekers/Dockerfile index d62b7c7..097ec6c 100644 --- a/apps/job_seekers/Dockerfile +++ b/apps/job_seekers/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin job_seekers --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/makeup_artists/Dockerfile b/apps/makeup_artists/Dockerfile index 451a7b5..acc2842 100644 --- a/apps/makeup_artists/Dockerfile +++ b/apps/makeup_artists/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin makeup_artists --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/payments/Dockerfile b/apps/payments/Dockerfile index 5ce8379..bd39185 100644 --- a/apps/payments/Dockerfile +++ b/apps/payments/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin payments --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/photographers/Dockerfile b/apps/photographers/Dockerfile index 5962afb..104130f 100644 --- a/apps/photographers/Dockerfile +++ b/apps/photographers/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin photographers --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/social_media_managers/Dockerfile b/apps/social_media_managers/Dockerfile index 974ece1..1e9ff3a 100644 --- a/apps/social_media_managers/Dockerfile +++ b/apps/social_media_managers/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin social_media_managers --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/tutors/Dockerfile b/apps/tutors/Dockerfile index c5063d1..8967d4e 100644 --- a/apps/tutors/Dockerfile +++ b/apps/tutors/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin tutors --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/ugc_content_creators/Dockerfile b/apps/ugc_content_creators/Dockerfile index 7e30ad9..e43b599 100644 --- a/apps/ugc_content_creators/Dockerfile +++ b/apps/ugc_content_creators/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin ugc_content_creators --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/users/Dockerfile b/apps/users/Dockerfile index ddcda6b..37c8b77 100644 --- a/apps/users/Dockerfile +++ b/apps/users/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin users --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime diff --git a/apps/video_editors/Dockerfile b/apps/video_editors/Dockerfile index 3a0beb7..cf655b0 100644 --- a/apps/video_editors/Dockerfile +++ b/apps/video_editors/Dockerfile @@ -2,13 +2,16 @@ FROM rust:alpine AS builder WORKDIR /usr/src/app -RUN apk add --no-cache musl-dev pkgconfig openssl-dev && rustup target add x86_64-unknown-linux-musl +RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static && \ + rustup target add x86_64-unknown-linux-musl COPY Cargo.toml Cargo.lock ./ COPY crates ./crates COPY apps ./apps ENV RUSTFLAGS='-C target-feature=+crt-static' +ENV OPENSSL_STATIC=1 +ENV OPENSSL_DIR=/usr RUN cargo build --release --bin video_editors --target x86_64-unknown-linux-musl FROM alpine:latest AS runtime