Skip to content

Commit

Permalink
Only install binutils-gold for ARMv7 target
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <hello@hidde.co>
  • Loading branch information
hiddeco committed Jun 16, 2021
1 parent 3af8962 commit 14248d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Docker buildkit multi-arch build requires golang alpine
FROM golang:1.16-alpine as builder

RUN apk add --no-cache gcc pkgconfig libc-dev binutils-gold musl~=1.2 libgit2-dev~=1.1
ARG TARGETPLATFORM

RUN pkgs="gcc pkgconfig libc-dev musl~=1.2 libgit2-dev=~1.1"; \
if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
pkgs="$pkgs binutils-gold"; \
fi; \
apk add --no-cache $pkgs

WORKDIR /workspace

Expand Down

0 comments on commit 14248d0

Please sign in to comment.