20 lines
329 B
Docker
20 lines
329 B
Docker
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" ]
|