Skip to content

Commit 201a890

Browse files
committed
Add Dockerfile
1 parent 5286d1e commit 201a890

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM golang:1.16.5-alpine AS build
2+
RUN apk add --no-cache git
3+
WORKDIR /src/bdo-rest-api
4+
COPY go.mod .
5+
COPY go.sum .
6+
RUN go mod download
7+
COPY . .
8+
RUN go build -o ./bin/bdo-rest-api .
9+
10+
FROM alpine:3.14 AS bin
11+
COPY --from=build /src/bdo-rest-api/bin/bdo-rest-api /app/bdo-rest-api
12+
EXPOSE 8001
13+
CMD ["/app/bdo-rest-api"]

0 commit comments

Comments
 (0)