-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: support customize base image (#519)
Signed-off-by: Jim Ma <majinjing3@gmail.com>
- Loading branch information
Showing
19 changed files
with
178 additions
and
61 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
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,24 @@ | ||
FROM quay.io/iovisor/bpftrace:v0.13.0 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y binutils bpfcc-tools curl git iproute2 iputils-ping jq socat tree vim wget \ | ||
&& apt-get install -y openssh-client openssh-server \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p /run/sshd | ||
|
||
ENV PATH=/go/bin:/usr/local/go/bin:$PATH | ||
|
||
ENV GOPATH=/go | ||
ENV GOLANG_VERSION 1.16.6 | ||
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz | ||
ENV GOLANG_DOWNLOAD_SHA256 be333ef18b3016e9d7cb7b1ff1fdb0cac800ca0be4cf2290fe613b3d069dfe0d | ||
|
||
ARG GOPROXY | ||
|
||
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ | ||
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ | ||
&& tar -C /usr/local -xzf golang.tar.gz \ | ||
&& rm golang.tar.gz \ | ||
&& go install github.com/go-delve/delve/cmd/dlv@v1.7.0 |
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,26 @@ | ||
# Base Image for Debugging | ||
|
||
## Build Base Image | ||
|
||
```shell | ||
BASE_IMAGE=dragonflyoss/base:bpftrace-v0.13.0-go-v1.16.6 | ||
|
||
docker run -ti -v /usr/src:/usr/src:ro \ | ||
-v /lib/modules/:/lib/modules:ro \ | ||
-v /sys/kernel/debug/:/sys/kernel/debug:rw \ | ||
--net=host --pid=host --privileged \ | ||
${BASE_IMAGE} | ||
``` | ||
|
||
## Build Dragonfly Images | ||
|
||
```shell | ||
# tags for condition compiling | ||
export GOTAGS="debug" | ||
# gcflags for dlv | ||
export GOGCFLAGS="all=-N -l" | ||
# base image | ||
export BASE_IMAGE=dragonflyoss/base:bpftrace-v0.13.0-go-v1.16.6 | ||
|
||
make docker-build | ||
``` |
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.