Skip to content

Commit

Permalink
remove musl hack
Browse files Browse the repository at this point in the history
  • Loading branch information
kd7lxl committed Jan 10, 2024
1 parent 78ebba7 commit df7eff7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions atlas/templates/docker/Dockerfile.debug.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
6 changes: 1 addition & 5 deletions atlas/templates/docker/Dockerfile.gotmpl
Original file line number Diff line number Diff line change
@@ -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 }}

Expand All @@ -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}}
Expand Down

0 comments on commit df7eff7

Please sign in to comment.