1- # syntax=docker/dockerfile:1.6-labs @sha256:bd24901c537a316a4802d920bf86605f4db8ef676ef7258a3b381e12d90c62c8
1+ # syntax=docker/dockerfile:1.8 @sha256:d6d396f3780b1dd56a3acbc975f57bd2fc501989b50164c41387c42d04e780d0
22
3- ARG ALPINE_VERSION=3.18
3+ ARG ALPINE_VERSION=3.20
44ARG ARCH=x86_64
55
6- FROM alpine:${ALPINE_VERSION} as rust-base
6+ FROM alpine:${ALPINE_VERSION} AS rust-base
77
88RUN apk add --no-cache ca-certificates gcc musl-dev
99
@@ -12,8 +12,12 @@ ENV CARGO_HOME=/usr/local/cargo
1212ENV PATH=/usr/local/cargo/bin:${PATH}
1313
1414ARG ARCH
15- ARG RUSTUP_VERSION=1.26.0
16- ARG RUST_VERSION=1.74
15+
16+ # Update check: https://github.com/rust-lang/rustup/tags
17+ ARG RUSTUP_VERSION=1.27.1
18+
19+ # Update check: https://github.com/rust-lang/rust/tags
20+ ARG RUST_VERSION=1.79.0
1721ARG RUST_ARCH=${ARCH}-unknown-linux-musl
1822
1923# https://github.com/sfackler/rust-openssl/issues/1462
@@ -27,17 +31,18 @@ RUN /tmp/rustup-init \
2731 --default-toolchain ${RUST_VERSION} \
2832 --default-host ${RUST_ARCH}
2933
30- FROM rust-base as dev-planner
34+ FROM rust-base AS dev-planner
3135
32- RUN cargo install --version 0.1.62 cargo-chef
36+ # Update check: https://github.com/LukeMathWalker/cargo-chef/releases
37+ RUN cargo install --version 0.1.67 cargo-chef
3338
3439WORKDIR /usr/src/josh
3540COPY . .
3641
3742ENV CARGO_TARGET_DIR=/opt/cargo-target
3843RUN cargo chef prepare --recipe-path recipe.json
3944
40- FROM rust-base as dev
45+ FROM rust-base AS dev
4146
4247RUN apk add --no-cache \
4348 zlib-dev \
@@ -46,25 +51,28 @@ RUN apk add --no-cache \
4651
4752WORKDIR /usr/src/josh
4853RUN rustup component add rustfmt
49- RUN cargo install --version 0.1.62 cargo-chef
54+ RUN cargo install --version 0.1.67 cargo-chef
5055RUN cargo install --verbose --version 0.10.0 graphql_client_cli
5156
5257RUN apk add --no-cache \
5358 bash \
59+ coreutils \
5460 curl \
5561 cmake \
5662 make \
5763 expat-dev \
5864 gettext \
5965 python3 \
6066 python3-dev \
67+ libffi-dev \
6168 py3-pip \
6269 tree \
6370 autoconf \
6471 libgit2-dev \
6572 psmisc
6673
67- ARG GIT_VERSION=2.38.1
74+ # Update check: https://github.com/git/git/tags
75+ ARG GIT_VERSION=2.45.2
6876WORKDIR /usr/src/git
6977RUN <<EOF
7078set -e
@@ -85,10 +93,12 @@ RUN mkdir /opt/git-install/etc
8593RUN git config -f /opt/git-install/etc/gitconfig --add safe.directory "*" && \
8694 git config -f /opt/git-install/etc/gitconfig protocol.file.allow "always"
8795
88- ARG CRAM_VERSION=d245cca
89- ARG PYGIT2_VERSION=1.11.1
90- RUN pip3 install \
91- git+https://github.com/brodie/cram.git@${CRAM_VERSION}
96+ # Update check: https://github.com/prysk/prysk/releases
97+ ARG PRYSK_VERSION=0.20.0
98+
99+ # This is a Docker image so --break-system-packages is okay
100+ RUN pip3 install --break-system-packages \
101+ git+https://github.com/prysk/prysk.git@${PRYSK_VERSION}
92102
93103RUN apk add --no-cache go nodejs npm openssh-client patch
94104
@@ -106,7 +116,7 @@ RUN cp bin/git-lfs /opt/git-lfs/bin
106116
107117WORKDIR /usr/src/josh
108118
109- FROM dev as dev-local
119+ FROM dev AS dev-local
110120
111121RUN mkdir -p /opt/cache && \
112122 chmod 777 /opt/cache
@@ -140,12 +150,12 @@ RUN adduser \
140150 -g '' \
141151 dev
142152
143- FROM dev as dev-cache
153+ FROM dev AS dev-cache
144154
145155COPY --from=dev-planner /usr/src/josh/recipe.json .
146156ENV CARGO_TARGET_DIR=/opt/cargo-target
147157
148- FROM dev-cache as dev-ci
158+ FROM dev-cache AS dev-ci
149159
150160RUN mkdir -p /josh/static && \
151161 chmod 777 /josh/static
@@ -156,7 +166,7 @@ RUN mkdir -p josh-ui
156166COPY josh-ui/package.json josh-ui/package-lock.json josh-ui/
157167RUN cd josh-ui && npm install
158168
159- FROM dev-cache as build
169+ FROM dev-cache AS build
160170
161171RUN cargo chef cook --release --workspace --recipe-path recipe.json
162172
@@ -167,7 +177,7 @@ RUN --mount=target=.git,from=git \
167177 cargo build -p josh-proxy -p josh-ssh-shell --release
168178
169179ARG ALPINE_VERSION
170- FROM alpine:${ALPINE_VERSION} as run
180+ FROM alpine:${ALPINE_VERSION} AS run
171181
172182RUN apk add --no-cache \
173183 zlib \
0 commit comments