From df7eff7ebe961bec28f687ffdabf7b6fde5cf990 Mon Sep 17 00:00:00 2001 From: Tom Hayward Date: Wed, 10 Jan 2024 12:02:43 -0800 Subject: [PATCH] remove musl hack --- atlas/templates/docker/Dockerfile.debug.gotmpl | 4 ---- atlas/templates/docker/Dockerfile.gotmpl | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/atlas/templates/docker/Dockerfile.debug.gotmpl b/atlas/templates/docker/Dockerfile.debug.gotmpl index 5c1ad06..f623573 100644 --- a/atlas/templates/docker/Dockerfile.debug.gotmpl +++ b/atlas/templates/docker/Dockerfile.debug.gotmpl @@ -15,10 +15,6 @@ RUN CGO_ENABLED=0 GOOS=linux go build -gcflags="all=-N -l" -o bin/server ./cmd/s FROM alpine:latest AS runner WORKDIR /bin -# Go programs require libc -RUN mkdir -p /lib64 && \ - ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 - COPY --from=builder /go/src/{{ .Root }}/{{ .Name }}/bin/server . {{ if .WithGateway }}COPY pkg/pb/*.swagger.json www/swagger.json{{ end }} {{ if .WithDatabase }}COPY --from=builder /go/src/{{ .Root }}/{{ .Name }}/db/migrations /db/migrations/{{end}} diff --git a/atlas/templates/docker/Dockerfile.gotmpl b/atlas/templates/docker/Dockerfile.gotmpl index 09e303d..7dbce3b 100644 --- a/atlas/templates/docker/Dockerfile.gotmpl +++ b/atlas/templates/docker/Dockerfile.gotmpl @@ -1,5 +1,5 @@ # build the server binary -FROM golang:1.19 AS builder +FROM golang:1.19-alpine AS builder LABEL stage=server-intermediate WORKDIR /go/src/{{ .Root }}/{{ .Name }} @@ -10,10 +10,6 @@ RUN go build -mod=vendor -o bin/server ./cmd/server FROM alpine:latest AS runner WORKDIR /bin -# Go programs require libc -RUN mkdir -p /lib64 && \ - ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 - COPY --from=builder /go/src/{{ .Root }}/{{ .Name }}/bin/server . {{ if .WithGateway }}COPY pkg/pb/*.swagger.json www/swagger.json{{ end }} {{ if .WithDatabase }}COPY --from=builder /go/src/{{ .Root }}/{{ .Name }}/db/migrations /db/migrations/{{end}}