Skip to content

Commit

Permalink
go dependencies in alpine (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilsty authored Dec 14, 2022
1 parent 18d5508 commit b6ce199
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
# https://hub.docker.com/_/golang
FROM golang:1.19 as builder

# https://stackoverflow.com/questions/36279253/go-compiled-binary-wont-run-in-an-alpine-docker-container-on-ubuntu-host
ENV CGO_ENABLED=0

# Set the current working directory inside the container.
WORKDIR /go/src/github.com/score-spec/score-compose

# Copy the entire project and build it.
COPY . .
RUN go build -o /usr/local/bin/score-compose ./cmd/score-compose
RUN GOOS=linux GOARCH=amd64 go build -o /usr/local/bin/score-compose ./cmd/score-compose

# Use the official Alpine image for a lean production container.
# https://hub.docker.com/_/alpine
Expand Down

0 comments on commit b6ce199

Please sign in to comment.