dogtamer/Dockerfile

14 lines
302 B
Docker
Raw Normal View History

2021-08-21 14:15:29 +00:00
FROM golang:latest as builder
WORKDIR /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
RUN go mod download
COPY . /app
RUN CGO_ENABLED=0 go build -o dogtamer cmd/dogtamer.go
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/dogtamer /app/dogtamer
EXPOSE 5566
CMD ["/app/dogtamer", "serve"]