Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context argument support in "docker" build option #972

Open
eles13 opened this issue Dec 7, 2024 · 0 comments
Open

Context argument support in "docker" build option #972

eles13 opened this issue Dec 7, 2024 · 0 comments
Labels
kind/enhancement New feature or request

Comments

@eles13
Copy link

eles13 commented Dec 7, 2024

Use case
I am trying to debug via Cloud Code. My image is to be build like this docker build -t <target> -f <subdirectory_of_my_project>/Dockerfile. In <subdirectory_of_my_project> I have separate microservice that relies on code that is stored in "." of the project -- it is used in my many microservices. So I run docker build as shown above and have paths relative to "." in the microservice Dockerfile. However, when I try to debug via Cloud Code, the only option is to use context of directory where the Dockerfile is stored and where the argument "path" is pointing to. (This suggestion is because I looked into autogenerated scaffold file)

Feature
What if you added an ability to add "context" keyword, just like it exists in docker-compose files?
Something like

"build": {
    "docker": {
        "path": "${workspaceFolder}/<microservice>/Dockerfile",
        "target": "<microservice>",
        "context": "${workspaceFolder}",
    }
},
@davidponder davidponder added the kind/enhancement New feature or request label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants