Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Fix bugs with .dockerignore and improve integration test#424

Merged
priyawadhwa merged 1 commit intoGoogleContainerTools:masterfrom
priyawadhwa:dockerignore
Oct 31, 2018
Merged

Fix bugs with .dockerignore and improve integration test#424
priyawadhwa merged 1 commit intoGoogleContainerTools:masterfrom
priyawadhwa:dockerignore

Conversation

@priyawadhwa
Copy link
Copy Markdown
Contributor

I improved handling of the .dockerignore file by:

  1. Using docker's parser to parse the .dockerignore and using their
    helper functions to determine if a file should be deleted
  2. Copying the Dockerfile we are building to /kaniko/Dockerfile so that
    if the Dockerfile is specified in .dockerignore it won't be deleted, and
    if it is specified in the .dockerignore it won't end up in the final
    image
  3. I also improved the integration test to create a temp directory with
    files to ignore, and updated the .dockerignore to include exclusions (!)

Should fix #422

I improved handling of the .dockerignore file by:

1. Using docker's parser to parse the .dockerignore and using their
helper functions to determine if a file should be deleted
2. Copying the Dockerfile we are building to /kaniko/Dockerfile so that
if the Dockerfile is specified in .dockerignore it won't be deleted, and
if it is specified in the .dockerignore it won't end up in the final
image
3. I also improved the integration test to create a temp directory with
files to ignore, and updated the .dockerignore to include exclusions (!)
@priyawadhwa priyawadhwa merged commit 7afb11c into GoogleContainerTools:master Oct 31, 2018
@priyawadhwa priyawadhwa deleted the dockerignore branch October 31, 2018 21:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing ignored files also removes the Dockerfile

3 participants