From 0ba21e184df11fd8c719f2672a3736318ce7c05b Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 2 Nov 2023 17:06:44 +0530 Subject: [PATCH 1/2] fix: install libssk-dev to compile openssl --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d0bad82..89877c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN make frontend FROM rust:1-slim-bookworm as rust WORKDIR /src -RUN apt-get update && apt-get install -y git +RUN apt-get update && apt-get install -y git libssl-dev COPY . /src COPY --from=frontend /src/static/cache/bundle /src/static/cache/bundle RUN cargo build --release From ba379f199967bf89e2d56bb23531fce7bdecd345 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sun, 5 Nov 2023 00:07:53 +0530 Subject: [PATCH 2/2] fix: use bookworm --- Dockerfile | 4 ++-- Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 89877c5..064d814 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,14 +8,14 @@ RUN yarn install COPY . . RUN make frontend -FROM rust:1-slim-bookworm as rust +FROM rust:latest as rust WORKDIR /src RUN apt-get update && apt-get install -y git libssl-dev COPY . /src COPY --from=frontend /src/static/cache/bundle /src/static/cache/bundle RUN cargo build --release -FROM debian:bookworm-slim +FROM debian:bookworm RUN useradd -ms /bin/bash -u 1001 mcaptcha-survey WORKDIR /home/mcaptcha-survey COPY --from=rust /src/target/release/survey /usr/local/bin/ diff --git a/Makefile b/Makefile index 17d3a6e..85e9c9a 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ doc: ## Prepare documentation cargo doc --no-deps --workspace --all-features docker: ## Build docker images - docker build -t mcaptcha/survey:master -t mcaptcha/survey:latest . + docker buildx build -t mcaptcha/survey:master -t mcaptcha/survey:latest . --load docker-publish: docker ## Build and publish docker images docker push mcaptcha/survey:master