Skip to content

Instantly share code, notes, and snippets.

@wojas
Created October 30, 2025 15:01
Show Gist options
  • Select an option

  • Save wojas/e1b644d2ccf75765a8b8f20365fe8e07 to your computer and use it in GitHub Desktop.

Select an option

Save wojas/e1b644d2ccf75765a8b8f20365fe8e07 to your computer and use it in GitHub Desktop.
Create a container with godu to inspect what is included in your docker context
#!/bin/sh
ROOT=$HOME/docker/godu
set -ex
docker build -t godu-context -f "$ROOT/Dockerfile" .
docker run --rm -it godu-context
docker rmi godu-context
FROM golang:1.20-alpine
ENV GOBIN /usr/local/bin
RUN go install github.com/viktomas/godu@latest
COPY / /context
WORKDIR /context
CMD ["/usr/local/bin/godu", "-l", "1", "/context"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment