Allow options when building and using an image instead of a Dockerfile

Open
#922 0 comments 1 reaction 1 assignee View on GitHub

@v-Kaniska244 is already working on this.

Since Nov 27, 2024.

Assessment

This issue has not been assessed yet.

Description

feature-request

There is a build.options property that allows adding additional command line arguments to the Docker command while building. For example:

{
    "build": {
        "dockerfile": "Dockerfile",
        "options": [
            "--add-host=host.docker.internal:host-gateway"
        ]
    },
    "features": {
        ...
    }
}

This works great. But often the base is just an image and features are just installed while building. So there would be the following:

{
    "image": "debian:11",
    "build": {
        "options": [
            "--add-host=host.docker.internal:host-gateway"
        ]
    },
    "features": {
        ...
    }
}

This unfortunately does not work as image and build are not allowed together. It would be great if either the optionswould work withimageor therunArgs` or a separate property would exist to pass additional command line options.

Dominant language
TypeScript
Stars
3k
Forks
461
Avg merge
18m
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

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.

More from devcontainers/cli

All issues in devcontainers/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.