You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
329 B

ARG VERSION=17
FROM golang AS builder
WORKDIR /app
COPY ./src /app/src
COPY ./go.mod /app
COPY ./go.sum /app
RUN go build -o /app/main /app/src/main.go
RUN go build -o /app/cmd /app/src/cmd/cmd.go
FROM debian
COPY --from=builder /app/main /main
COPY --from=builder /app/cmd /usr/local/bin/cmd
EXPOSE 8081
CMD [ "/main" ]