zkt24/backend/Dockerfile

13 lines
319 B
Docker
Raw Normal View History

2024-04-10 09:23:23 +00:00
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