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

Put Dockerfile.netkan in build context #2840

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

HebaruSan
Copy link
Member

Problem

#2838 added a build process to rebuild and push a Docker inflator container, but it failed:

https://travis-ci.org/KSP-CKAN/CKAN/jobs/569174846#L4638-L4642

========================================
docker-inflator
========================================
unable to prepare context: the Dockerfile (/home/travis/build/KSP-CKAN/CKAN/Dockerfile.netkan) must be within the build context
An error occurred when executing task 'docker-inflator'.

Cause

Prior to docker/cli#886, the Dockerfile specified by the -f parameter had to be in the build directory for... some reason.

That requirement was removed in Docker 18.03.0-ce. Travis has 17.09.0-ce. I have 18.09.7. So when I tested #2839 locally, it worked fine, then failed when pushed to master.

Changes

Now we copy Dockerfile.netkan into _build/docker/inflator before building.
If Travis ever upgrades to Docker 18.03.0-ce or later, we can revert this.

@HebaruSan HebaruSan added Bug Easy This is easy to fix Pull request Build Issues affecting the build system Netkan Issues affecting the netkan data Cake Issues affecting Cake labels Aug 8, 2019
@techman83
Copy link
Member

Thanks @HebaruSan LGTM! I haven't fully dug into build contexts, but likely it was picked up within the context automatically before the ability to specify a filename existed. And why being aware of what ends up in the context is important -> https://medium.com/lucjuggery/docker-tips-about-the-build-context-dbc76505e178

@techman83 techman83 merged commit ae65b7d into KSP-CKAN:master Aug 9, 2019
@HebaruSan HebaruSan deleted the fix/dockerfile-path branch August 9, 2019 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build Issues affecting the build system Cake Issues affecting Cake Easy This is easy to fix Netkan Issues affecting the netkan data Pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants