FROM golang AS build # RUN apk --no-cache add gcc g++ make git WORKDIR /go/src/app COPY . . RUN go mod tidy # RUN GOOS=linux go build -ldflags="-s -w" -o ./bin/web-app RUN GOOS=linux go build -o ./bin/web-app FROM ubuntu WORKDIR /usr/bin COPY --from=build /go/src/app/bin /go/bin EXPOSE 3000 ENTRYPOINT /go/bin/web-app