Skip to content

Commit

Permalink
build: try alpine again
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
  • Loading branch information
sagikazarmark committed Apr 14, 2023
1 parent f762bb8 commit cd7c035
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
ARG BASE_IMAGE=alpine

FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.2.1 AS xx

FROM --platform=$BUILDPLATFORM golang:1.20.3 AS builder

# RUN apk add --no-cache --update alpine-sdk ca-certificates openssl clang lld
RUN apt-get update && apt-get install -y clang lld pkg-config
FROM --platform=$BUILDPLATFORM golang:1.20.3-alpine3.16 AS builder

COPY --from=xx / /

ARG TARGETPLATFORM
RUN apk add --update alpine-sdk ca-certificates openssl clang lld

# gcc is only installed for libgcc
# RUN xx-apk --update --no-cache add musl-dev gcc
RUN xx-apt-get install -y binutils gcc libc6-dev
ARG TARGETPLATFORM

RUN xx-go --wrap
RUN xx-apk --update add musl-dev gcc

# lld has issues building static binaries for ppc so prefer ld for it
# RUN [ "$(xx-info arch)" != "ppc64le" ] || XX_CC_PREFER_LINKER=ld xx-clang --setup-target-triple
RUN [ "$(xx-info arch)" != "ppc64le" ] || XX_CC_PREFER_LINKER=ld xx-clang --setup-target-triple

RUN xx-go --wrap

WORKDIR /usr/local/src/dex

Expand Down

0 comments on commit cd7c035

Please sign in to comment.