Skip to content

Instantly share code, notes, and snippets.

@l3ender
Last active April 9, 2023 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l3ender/ff4b1fe3a22db7ffd24f729f29d94f9f to your computer and use it in GitHub Desktop.
Save l3ender/ff4b1fe3a22db7ffd24f729f29d94f9f to your computer and use it in GitHub Desktop.
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