Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
allow docker build in addition to buildx
if using `docker build` it is required to use `--build-arg TARGETARCH=arm64` to build for linux/arm64/v8
  • Loading branch information
Outshynd authored Sep 16, 2022
commit 973fa38d324c78c06441ecdcadd934e4d6f3da44
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM tiltedphoques/multiarch-builder:latest as builder
ARG TARGETARCH=amd64

FROM outshynd/multiarch-builder:latest as builder

ARG REPO=https://github.com/tiltedphoques/TiltedEvolution.git
ARG BRANCH=master
Expand All @@ -14,18 +16,20 @@ RUN git clone --recursive -b ${BRANCH} ${REPO} ./str && \
#Building for x86_64
FROM builder as amd64builder

RUN cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30 /home/builder/libstdc++.so.6
RUN cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30 /home/builder/libstdc++.so.6 2>/dev/null || :


#Building for arm64/v8
FROM builder as arm64builder

RUN cp /usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30 /home/builder/libstdc++.so.6
RUN cp /usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30 /home/builder/libstdc++.so.6 2>/dev/null || :


#Intermediate image that has the library specific to our $TARGETARCH
FROM ${TARGETARCH}builder as intermediate

ARG TARGETARCH

RUN echo "Building for $TARGETARCH"


Expand Down