Skip to content

Instantly share code, notes, and snippets.

@blixt
Last active June 11, 2018 17:55
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 blixt/1af0ba74c740b4e0e972594f45adf1b9 to your computer and use it in GitHub Desktop.
Save blixt/1af0ba74c740b4e0e972594f45adf1b9 to your computer and use it in GitHub Desktop.
Workaround for copying files in same directory in separate layers (without specifying individual files)
# First, outside the Dockerfile:
tar --exclude ./static-large --exclude-from=.dockerignore -czf non-large.tar.gz ./*
# Then, in the Dockerfile:
COPY static-large $WORKDIR_PATH/static-large/
ADD non-large.tar.gz $WORKDIR_PATH/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment