Skip to content

Commit 6594c4e

Browse files
refi64sjoerdsimons
authored andcommitted
Update Dockerfile to Rust 1.75 and Debian Bookworm
In particular, Rust 1.75 this gives us the sparse registry, which helps significantly speed up container builds. The adduser command did have to be changed to groupadd/useradd, as it seems the container no longer has adduser by default, and useradd is more universal anyway. Signed-off-by: Ryan Gonzalez <[email protected]>
1 parent e5c87e2 commit 6594c4e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.64.0-slim-bullseye AS build
1+
FROM rust:1.75.0-slim-bookworm AS build
22
ARG DEBIAN_FRONTEND=noninteractive
33

44
ADD . /app
@@ -7,13 +7,17 @@ RUN apt-get update \
77
&& apt-get install -y pkg-config libssl-dev \
88
&& cargo build --release
99

10-
FROM debian:bullseye-slim
10+
FROM debian:bookworm-slim
1111
ARG DEBIAN_FRONTEND=noninteractive
1212

13-
RUN adduser --uid 1001 --group --no-create-home --home /app obs-gitlab-runner
13+
RUN groupadd --gid 1001 obs-gitlab-runner \
14+
&& useradd \
15+
--uid 1001 --gid 1001 \
16+
--no-create-home --home-dir /app \
17+
obs-gitlab-runner
1418

1519
RUN apt-get update \
16-
&& apt-get install -y libssl1.1 ca-certificates \
20+
&& apt-get install -y libssl3 ca-certificates \
1721
&& rm -rf /var/lib/apt/lists/
1822
COPY --from=build /app/target/release/obs-gitlab-runner /usr/local/bin/
1923

0 commit comments

Comments
 (0)