-
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.
Make docker container light weight to remove source code
- Loading branch information
Showing
1 changed file
with
7 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,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"] |