Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs with .dockerignore and improve integration test #424

Merged
merged 1 commit into from
Oct 31, 2018

Conversation

priyawadhwa
Copy link
Collaborator

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing ignored files also removes the Dockerfile
3 participants