Skip to content

Commit e8ef9bc

Browse files
authored
Merge pull request #2647 from panasenco/master
Updated Dockerfile
2 parents c39ea48 + 7b18b1d commit e8ef9bc

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
# See https://github.com/LukeMathWalker/cargo-chef
2-
ARG RUST_VERSION=1-buster
3-
FROM rust:${RUST_VERSION} as planner
2+
ARG DEBIAN_RELEASE=bookworm
3+
ARG RUST_VERSION=1-${DEBIAN_RELEASE}
4+
FROM rust:${RUST_VERSION} AS planner
45
WORKDIR /scryer-prolog
56
RUN cargo install cargo-chef
67
COPY . .
78
RUN cargo chef prepare --recipe-path recipe.json
89

9-
FROM rust:${RUST_VERSION} as cacher
10+
FROM rust:${RUST_VERSION} AS cacher
1011
WORKDIR /scryer-prolog
1112
RUN cargo install cargo-chef
1213
COPY --from=planner /scryer-prolog/recipe.json recipe.json
1314
RUN cargo chef cook --release --recipe-path recipe.json
1415

15-
FROM rust:${RUST_VERSION} as builder
16+
FROM rust:${RUST_VERSION} AS builder
1617
WORKDIR /scryer-prolog
1718
COPY . .
1819
# Copy over the cached dependencies
1920
COPY --from=cacher /scryer-prolog/target target
2021
COPY --from=cacher $CARGO_HOME $CARGO_HOME
2122
RUN cargo build --release --bin scryer-prolog
2223

23-
# Newer versions of Debian (i.e. bookworm) contain libssl3 instead of libssl1.1
24-
# which we depend on.
25-
FROM debian:bullseye-slim
24+
FROM debian:${DEBIAN_RELEASE}-slim
25+
RUN apt-get update \
26+
&& apt-get install -y --no-install-recommends openssl \
27+
&& apt-get clean -y \
28+
&& rm -rf /var/lib/apt/lists/*
2629
COPY --from=builder /scryer-prolog/target/release/scryer-prolog /usr/local/bin
2730
ENV RUST_BACKTRACE=1
2831
# Sanity check the binary: if it can't be executed (e.g. if there are missing libraries)

0 commit comments

Comments
 (0)