Skip to content

Instantly share code, notes, and snippets.

@l3ender
Last active April 9, 2023 20:39
Dockerfile-context.md

Create following file (source):

FROM busybox

RUN mkdir /tmp/build/
# Add context to /tmp/build/
COPY . /tmp/build/
RUN ls -la /tmp/build

Use as follows:

docker rmi -f context && BUILDKIT_PROGRESS=plain docker build -t context -f Dockerfile --platform=linux/amd64 .

If seeing cached layers and no output, either make a change to the Dockerfile or run following:

docker builder prune -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment