zkt24/z1/backend/Dockerfile
2024-04-25 13:51:47 +02:00

13 lines
319 B
Docker

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