Skip to content

Commit

Permalink
Add docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
chenk keinan committed Nov 4, 2020
1 parent b771025 commit 4cc4026
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ script:
- goveralls -service=travis-pro
- make test_travis
- make build_travis
- ./build_docker

6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ ADD . /src

WORKDIR /src/cmd/kube

RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o beacon .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o kube-beacon .

FROM alpine:latest

RUN apk --no-cache add ca-certificates

WORKDIR /root/

COPY --from=builder /src/cmd/kube/beacon .
COPY --from=builder /src/cmd/kube/kube-beacon .

CMD ["./beacon"]
CMD ["./kube-beacon"]
12 changes: 12 additions & 0 deletions scripts/build_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Install docker client
sudo apt-get update
sudo apt-get install docker-ce
# build docker image
docker build ./ -t kube-beacon -f Dockerfile
# login to registry
docker login beacon.jfrog.io -u $(USER) -p $(PASSWORD)
# tag image image
docker tag kube-beacon:latest beacon.jfrog.io/docker-local/kube-beacon:latest
# push image to repository
docker push beacon.jfrog.io/docker-local/kube-beacon:latest

0 comments on commit 4cc4026

Please sign in to comment.