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