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

dev-container build options (for features) cannot be used when using an image but with a Dockerfile #9669

Closed
Roemer opened this issue Mar 18, 2024 · 3 comments
Assignees
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality

Comments

@Roemer
Copy link

Roemer commented Mar 18, 2024

I have a base image and want to add a feature to it. But I need the --add-host option from the build specification.

When using a Dockerfile, this works:

"build": {
	"dockerfile": "Dockerfile",
	"options": [
		"--add-host=host.docker.internal:host-gateway"
	]
},
"features": {
	"ghcr.io/devcontainers/features/go:1.3.0": {
		"version": "1.22.1"
	}
},

whereas the Dockerfile just contains FROM myImage.

Now instead of a Dockerfile, I thought I could just use the image: myImage property in the devcontainer.json file and get rid of the Dockerfile but when using that, the build property and therefore the options are not valid and are not used when building the image with an additional feature.

  • VSCode Version: 1.87.2
  • Local OS Version: Windows 10
  • Remote OS Version: Debian 11
  • Remote Extension/Connection Type: Container in WSL
@vscodenpa vscodenpa added the containers Issue in vscode-remote containers label Mar 18, 2024
@chrmarti chrmarti added the feature-request Request for new features or functionality label Dec 12, 2024
@vs-code-engineering vs-code-engineering bot added this to the Backlog Candidates milestone Dec 12, 2024
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Copy link

This feature request has not yet received the 10 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding

Copy link

🙁 In the last 60 days, this feature request has received less than 10 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants