Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiarch #1

Merged
merged 5 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish docker image
on:
push:
pull_request:
branches: master
jobs:

publish:
Expand All @@ -10,6 +10,12 @@ jobs:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand All @@ -18,4 +24,4 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: push
run: make push
run: make build-push-all
20 changes: 8 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ DLV_VERSION=v1.21.2

TAG=$(DLV_VERSION)

ARCHS=linux/arm64,linux/amd64

MIN_IMAGE=oklischat/delve:$(TAG)
SUMO_IMAGE=oklischat/delve-sumo:$(TAG)

build-min:
docker build --target minimal --build-arg DLV_VERSION=$(DLV_VERSION) --tag $(MIN_IMAGE) .

build-sumo:
docker build --target sumo --build-arg DLV_VERSION=$(DLV_VERSION) --tag $(SUMO_IMAGE) .

build-all: build-min build-sumo
# build targets also --push because just --load'ing them into Docker isn't directly supported currently -- https://github.com/docker/buildx/issues/59

push-min: build-min
docker push $(MIN_IMAGE)
build-push-min:
docker buildx build --push --platform $(ARCHS) --target minimal --build-arg DLV_VERSION=$(DLV_VERSION) --tag $(MIN_IMAGE) .

push-sumo: build-sumo
docker push $(SUMO_IMAGE)
build-push-sumo:
docker buildx build --push --platform $(ARCHS) --target sumo --build-arg DLV_VERSION=$(DLV_VERSION) --tag $(SUMO_IMAGE) .

push: push-min push-sumo
build-push-all: build-push-min build-push-sumo
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Source: https://github.com/multi-io/docker-delve

Image: https://hub.docker.com/r/oklischat/delve

Usually run with the binary to be debugged mounted into the container. You could
also copy the dlv binary (which is linked statically) out of the container into
the to-be-debugged container, e.g. if you use this image in a K8s
Expand All @@ -28,3 +30,6 @@ docker run --security-opt seccomp:unconfined -v `pwd`/output:/output -p 2345:234
You should now be able to connect any debugging client running on the
host (e.g delve itself, or an IDE like Goland) to the debugged process
at `localhost:2345`.

The images are multi-arch, currently linux/amd64 and linux/arm64. Docker will
automatically choose the one matching the local system.