forked from skydive-project/skydive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is no clear Dockerfile or easy way to build a local docker image. This patch allows to run 'make docker' and it will use a multi-stage Dockerfile inspired by the CI Dockerfile for the build. It allows to use DOCKER_IMAGE and DOCKER_TAG, which are defined on .mk/dist for docker-image target, which is not great for local development since the build runs on the host, not in container.
- Loading branch information
1 parent
d9f5425
commit da41cb3
Showing
2 changed files
with
22 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ubuntu:20.04 as builder | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get -y update \ | ||
&& apt-get -y install build-essential git-core golang npm openvswitch-common libpcap0.8 libpcap0.8-dev libxml2-dev protobuf-compiler libprotobuf-dev libvirt-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR /go/src/github.com/skydive-project/skydive | ||
COPY . . | ||
ARG GOPATH=/go | ||
RUN make build | ||
|
||
FROM ubuntu:20.04 as skydive | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get -y update \ | ||
&& apt-get -y install golang npm openvswitch-common libpcap0.8 libvirt0 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY --from=builder /go/src/github.com/skydive-project/skydive/skydive /usr/bin/skydive | ||
COPY contrib/docker/skydive.yml /etc/skydive.yml | ||
ENTRYPOINT ["/usr/bin/skydive", "--conf", "/etc/skydive.yml"] |
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