jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-34654] support copy file from image

Open
#412 1 comment 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

Using Docker to control environment is great, but one does not want all build tools, source code and test results to be part of production image. So the need for a multi-step docker build (see https://github.com/docker/docker/issues/7115)

I use to have two Dockerfiles, one to build form source, the second to package binary into production environment. In the middle I need to get binaries from the build image to create second docker build context. As `docker cp` does not support copy from image (https://github.com/docker/docker/issues/7710) I have to create a container, copy, delete container.

Would be nice for docker-pipeline to make this simple by offering a `cp` method on image.

---
Originally reported by ndeloof, imported from: support copy file from image


  • status: In Review
  • priority: Minor
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-07

Raw content of original issue

Using Docker to control environment is great, but one does not want all build tools, source code and test results to be part of production image. So the need for a multi-step docker build (see https://github.com/docker/docker/issues/7115)

I use to have two Dockerfiles, one to build form source, the second to package binary into production environment. In the middle I need to get binaries from the build image to create second docker build context. As `docker cp` does not support copy from image (https://github.com/docker/docker/issues/7710) I have to create a container, copy, delete container.

Would be nice for docker-pipeline to make this simple by offering a `cp` method on image.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.