Skip to content

Understanding repo2docker's build context #565

Open
@jhamman

Description

@jhamman

Suppose a repository structure like this:

.
├── appendix.txt
├── base-notebook
│   └── binder
│       └── environment.yml
├── config.yaml
└── full-notebook
    └── binder
        ├── environment.yml

where appendix.txt is:

USER root
RUN mkdir -p /etc/config/
ADD ./config.yaml /etc/config/
USER jovyan

From the root of this repository, I call repo2docker as:

repo2docker --user-name=jovyan --appendix="`cat appendix.txt`" ./full-notebook

This fails in the appendix step because the config.yaml is not in Docker's build context.

Step 41/43 : ADD ./config.yaml /etc/config/
ADD failed: stat /var/lib/docker/tmp/docker-builder898774711/config.yaml: no such file or directory%

My questions:

  1. what is the root of the docker build in this case?
  2. Is it possible to tell repo2docker where the build root should be?
  3. The goal here is to have a common appendix/config for all the images to be built from this repo. Is there another way to share assets between images?

xref: pangeo-data/pangeo-stacks#1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions