From 475ca740d74b6cbc06796a97d0576fb2d8c5d4a3 Mon Sep 17 00:00:00 2001 From: Benedikt Rips Date: Sun, 27 Aug 2023 10:42:59 +0200 Subject: [PATCH 1/2] Remove version constraints on container images This fixes errors during the build of this image, occuring due to non-existent version tags. --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index dea4aae4..b0ac4e08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,20 @@ -FROM rust:1.64-bullseye AS selene-builder +FROM rust:bullseye AS selene-builder RUN apt-get update && \ apt-get upgrade -y && \ apt-get install g++ && \ cargo install --branch main --git https://github.com/Kampfkarren/selene selene -FROM rust:1.64-bullseye AS selene-light-builder +FROM rust:bullseye AS selene-light-builder RUN apt-get update && \ apt-get upgrade -y && \ apt-get install g++ && \ cargo install --no-default-features --branch main --git https://github.com/Kampfkarren/selene selene -FROM rust:1.64-alpine3.14 AS selene-musl-builder +FROM rust:alpine AS selene-musl-builder RUN apk add g++ && \ cargo install --branch main --git https://github.com/Kampfkarren/selene selene -FROM rust:1.64-alpine3.14 AS selene-light-musl-builder +FROM rust:alpine AS selene-light-musl-builder RUN apk add g++ && \ cargo install --no-default-features --branch main --git https://github.com/Kampfkarren/selene selene From f78fdb985d0a30fe07aeb17b0e5ee66cdeda6724 Mon Sep 17 00:00:00 2001 From: Benedikt Rips Date: Sun, 27 Aug 2023 12:11:34 +0200 Subject: [PATCH 2/2] feat(docker): parametrise the rust version --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index b0ac4e08..5e3abffa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,22 @@ -FROM rust:bullseye AS selene-builder +ARG RUST_VERSION="1" + +FROM rust:${RUST_VERSION}-bullseye AS selene-builder RUN apt-get update && \ apt-get upgrade -y && \ apt-get install g++ && \ cargo install --branch main --git https://github.com/Kampfkarren/selene selene -FROM rust:bullseye AS selene-light-builder +FROM rust:${RUST_VERSION}-bullseye AS selene-light-builder RUN apt-get update && \ apt-get upgrade -y && \ apt-get install g++ && \ cargo install --no-default-features --branch main --git https://github.com/Kampfkarren/selene selene -FROM rust:alpine AS selene-musl-builder +FROM rust:${RUST_VERSION}-alpine AS selene-musl-builder RUN apk add g++ && \ cargo install --branch main --git https://github.com/Kampfkarren/selene selene -FROM rust:alpine AS selene-light-musl-builder +FROM rust:${RUST_VERSION}-alpine AS selene-light-musl-builder RUN apk add g++ && \ cargo install --no-default-features --branch main --git https://github.com/Kampfkarren/selene selene @@ -32,4 +34,4 @@ CMD ["/selene"] FROM bash AS selene-light-musl COPY --from=selene-light-musl-builder /usr/local/cargo/bin/selene / -CMD ["/selene"] +CMD ["/selene"] \ No newline at end of file