Docker-Container-Demo/Dockerfile

13 lines
198 B
Docker
Raw Permalink Normal View History

2023-02-15 17:54:04 +00:00
FROM golang:1.19-alpine
WORKDIR /usr/src/demoserver
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/main.go ./cmd/main.go
RUN go build -o /usr/bin/server cmd/main.go
CMD ["/usr/bin/server"]