pangeo-data/pangeo-stacks

Figure out repo2docker's build context

Closed this issue · 7 comments

Using repo2docker's appendix is a natural way to inject some pangeo bits into each image. The current builds are failing because I can't seem to figure out the docker build context used by repo2docker.

Specifically, when I try to copy the dask config file to /etc/dask, docker is unable to find the file (which ideally is in the root location of the repo).

xref: https://travis-ci.org/pangeo-data/pangeo-stacks/builds/483969551

I've currently commented this line out to get CICD working:

# ADD ./dask.yaml /etc/dask/

The build context should be the current directory. I'm surprised ADD dask.yaml /etc/dask/dask.yaml doesn't work.

This is what I thought as well. It is possible repo2docker changes directory for each build. Now that I've looked at the code, I see a call to chdir.

I've opened an issue with the repo2docker folks...we'll see.

@jhamman if you don't absolutely need it to be Dockerfile, have you considered using a symlinked postBuild instead?

@yuvipanda - I had no success with the symlink approach. I also want to keep the postBuild available for the individual images. The appendix is really used to enforce some minimum dependencies that all pangeo images should have.

@jhamman cool. The problem with appendix is that two different repo2docker runs on the same repo directory will act differently based on appendix in the call to repo2docker, and there's no easy & replicable way to record this. As long as you're aware of that, it should be ok.

We no longer use an appendix!