Skip to content

Commit d101468

Browse files
Dockerfile fixes for arm build (#1180)
Change: arm-fixes
1 parent 6b87f44 commit d101468

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ ENV RUSTUP_HOME=/usr/local/rustup
1010
ENV CARGO_HOME=/usr/local/cargo
1111
ENV PATH=/usr/local/cargo/bin:${PATH}
1212

13+
ARG ARCH=x86_64
1314
ARG RUSTUP_VERSION=1.25.1
1415
ARG RUST_VERSION=1.66.0
15-
ARG RUST_ARCH=x86_64-unknown-linux-musl
16+
ARG RUST_ARCH=${ARCH}-unknown-linux-musl
1617

1718
# https://github.com/sfackler/rust-openssl/issues/1462
1819
ENV RUSTFLAGS="-Ctarget-feature=-crt-static"
@@ -86,8 +87,7 @@ RUN git config -f /opt/git-install/etc/gitconfig --add safe.directory "*" && \
8687
ARG CRAM_VERSION=d245cca
8788
ARG PYGIT2_VERSION=1.11.1
8889
RUN pip3 install \
89-
git+https://github.com/brodie/cram.git@${CRAM_VERSION} \
90-
pygit2==${PYGIT2_VERSION}
90+
git+https://github.com/brodie/cram.git@${CRAM_VERSION}
9191

9292
RUN apk add --no-cache go nodejs npm openssh-client patch
9393

@@ -184,8 +184,8 @@ COPY --from=build --link=false /usr/src/josh/static/ /josh/static/
184184
ARG S6_OVERLAY_VERSION=3.1.2.1
185185
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
186186
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
187-
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
188-
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
187+
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${ARCH}.tar.xz /tmp
188+
RUN tar -C / -Jxpf /tmp/s6-overlay-${ARCH}.tar.xz
189189

190190
ARG GIT_GID_UID=2001
191191

tester.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ else
2222
TESTS="$*"
2323
fi
2424

25+
ARCH=$(arch)
26+
27+
if (( ARCH == "arm64" )); then
28+
ARCH="aarch64"
29+
fi
30+
2531
echo "running: ${TESTS}"
2632

2733
if (( ! NO_BUILD_CONTAINER )); then
@@ -30,6 +36,7 @@ if (( ! NO_BUILD_CONTAINER )); then
3036
--tag=josh-dev-local \
3137
--build-arg USER_UID="$(id -u)" \
3238
--build-arg USER_GID="$(id -g)" \
39+
--build-arg ARCH="${ARCH}" \
3340
.
3441
fi
3542

0 commit comments

Comments
 (0)