-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Dockerfile which actually builds the code itself
- Loading branch information
Showing
1 changed file
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
FROM alpine | ||
LABEL maintainer mail@fleaz.me | ||
FROM golang:1.14 AS builder | ||
WORKDIR /go/src/cpthook | ||
COPY . /go/src/cpthook | ||
RUN CGO_ENABLED=0 GOOS=linux go build | ||
|
||
RUN apk add --no-cache ca-certificates | ||
COPY CptHook / | ||
EXPOSE 8086 | ||
CMD ["/CptHook"] | ||
FROM alpine:latest | ||
LABEL maintainer mail@fleaz.me | ||
RUN apk --no-cache add ca-certificates | ||
COPY --from=builder /go/src/cpthook/CptHook / | ||
CMD ["./CptHook"] |