openshift / openshift/origin

Docker direct build can't COPY or ADD into a volume

Open
#9,105 12 comments 0 reactions 1 assignee View on GitHub

@bparees is already working on this.

Since Jun 1, 2016.

blocked component/build kind/feature lifecycle/frozen priority/P2
Dominant language
Go
Stars
8.7k
Forks
4.8k
Avg merge
4d 10h
Merged PRs (30d)
53

Description

Docker build lets you bypass volume logic because it has direct ties to the internals of the daemon. Direct docker build can't, because it's impossible to start a container and disable a volume (or at least, I'm not aware of any way). As a result COPY or ADD into a known volume will work within the build, but not be preserved on commit.

We should definitely consider a change to Docker to allow volumes to be disabled at run, which would address this issue for us (we'd start without the volume, then commit it back at the end). Alternatively, we could provide a volume plugin that makes all volumes act as a no-op (but I don't know that that can change the behavior of the plugin).

@mrunalp is there any movement about letting docker run disable volumes? Or a no-op volume driver?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.