From b4cdde4551ec01840d9ad742201dcd3e7de912d7 Mon Sep 17 00:00:00 2001 From: Troy Dai <1329240+troydai@users.noreply.github.com> Date: Thu, 28 Dec 2023 11:15:43 -0800 Subject: [PATCH] Update various things (#1) --- Dockerfile | 4 +--- Makefile | 15 +++++++++++++++ README.md | 17 +++++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 Makefile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile index becd33c..7868066 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ FROM fullstorydev/grpcurl AS grpcurl FROM alpine -RUN apk add curl +RUN apk add --no-cache curl jq bind-tools tcpdump COPY --from=grpcurl /bin/grpcurl /bin/grpcurl - ENTRYPOINT ["tail", "-f", "/dev/null"] - diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2ea02cf --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +.PHONY: image + +IMAGE_NAME = "ghcr.io/troydai/toolbox" + +image: + @ echo "Building image $(IMAGE_NAME):latest" + @ docker build -q -t $(IMAGE_NAME):latest . + +sanity-test: image + @ echo "Running sanity test locally" + @ docker run --rm --entrypoint '' $(IMAGE_NAME):latest curl -s www.httpbin.org/ip + +sanity-sh: image + @ echo "Running a sh shell in the container for testing locally" + @ docker run --rm -it --entrypoint 'sh' $(IMAGE_NAME):latest diff --git a/README.md b/README.md new file mode 100644 index 0000000..24571f7 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Toolbox image + +A docker image that comes with tools I need for debugging purposes. + +## Installed tools + +- grpcurl +- curl +- jq +- dig +- tcpdump + +## Make targets + +- image: build the docker image locally +- sanity-test: run a sanity test against the local build image +- sanity-sh: run a shell in the locally built image interactively