Details
-
Type:
Improvement
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: pipeline-model-definition-plugin
-
Labels:None
-
Similar Issues:
Description
It looks like there is no way to specify a directory to build an image using the "dockerfile" option. It only supports "filename", which is analogous to "-f" for the "docker build" command-line, but "docker build" takes as a required argument the DIRECTORY. This is necessary if you don't want the docker daemon to copy the whole repository when making the image, and you want instead to export just a small subset of files. Maybe adding something like "build_args" could be more flexible.
Attachments
Issue Links
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Remote Link | This issue links to "PR #107 (Web Link)" [ 15385 ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
For example, for a very simple project with a Dockerfile in docker/:
docker build -t test -f docker/Dockerfile . -> Sending build context to Docker daemon 9.861 MB
docker build -t test -f docker/Dockerfile docker -> Sending build context to Docker daemon 2.048 kB
Sending ~10MB vs sending 2KB.
I really hope this issue gets addressed soon because it blocking us from using declarative pipelines as all our projects use this trick to avoid so much copying to the docker daemon...