Skip to content

Commit

Permalink
add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rehacktive committed Oct 23, 2021
1 parent 9134148 commit f3febfb
Show file tree
Hide file tree
Showing 4 changed files with 709 additions and 2 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang:1.17-buster AS build

WORKDIR /app

COPY go.mod ./
COPY go.sum ./
RUN go mod download

COPY . ./

RUN go build -o /caffeine

FROM gcr.io/distroless/base-debian10

WORKDIR /

COPY --from=build /caffeine /caffeine

EXPOSE 8000

USER nonroot:nonroot

ENTRYPOINT ["/caffeine"]
Loading

0 comments on commit f3febfb

Please sign in to comment.