Skip to content

Commit b39b200

Browse files
committed
feat: Create container image of utility tools not avialable in production containers
* The container can then be attached to a target container ephermerally for troubleshooting the target container * These tools include curl, netcat, iproute2, iperf, bash * The Makefile currently creates an image for linux/amd64 systems
1 parent 32e3da6 commit b39b200

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
build:
22
go build -o cmd/kubectl-nginx_supportpkg
33

4+
debugger:
5+
docker buildx build --platform linux/amd64 -t nginx-debugger -f nginx-debugger/Dockerfile .
6+
47
install: build
58
sudo cp cmd/kubectl-nginx_supportpkg /usr/local/bin

nginx-debugger/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM alpine:latest
2+
3+
RUN apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \
4+
&& ln -s /usr/bin/iperf /usr/local/bin/iperf \
5+
&& ls -altrh /usr/local/bin/iperf
6+
7+
ADD https://github.com/coredns/coredns/releases/download/v1.11.4/coredns_1.11.4_linux_amd64.tgz /coredns.tgz
8+
RUN tar -xzvf /coredns.tgz && rm -f /coredns.tgz
9+
10+
CMD ["bash"]

0 commit comments

Comments
 (0)