Skip to content

Commit

Permalink
New Dockerfile which actually builds the code itself
Browse files Browse the repository at this point in the history
  • Loading branch information
fleaz committed Jul 26, 2020
1 parent 1e1ffb6 commit b3bbda6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
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"]

0 comments on commit b3bbda6

Please sign in to comment.