Skip to content

Commit

Permalink
Make docker container light weight to remove source code
Browse files Browse the repository at this point in the history
  • Loading branch information
s1061123 committed Dec 10, 2018
1 parent 98e65ee commit e4367a7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#docker build --tag s1061123/kokotap -f ./docker/Dockerfile --rm .
#docker push s1061123/kokotap
#FROM golang:latest
FROM golang:alpine
FROM golang:latest as builder
ADD . $GOPATH/src/github.com/redhat-nfvpe/kokotap

WORKDIR $GOPATH/src/github.com/redhat-nfvpe/kokotap

RUN go build ./cmd/kokotap_pod && \
cp $GOPATH/src/github.com/redhat-nfvpe/kokotap/kokotap_pod /bin

FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root
COPY --from=builder /bin/kokotap_pod /bin
CMD ["/bin/kokotap_pod"]

0 comments on commit e4367a7

Please sign in to comment.