Skip to content
New issue

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

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

Already on GitHub? # to your account

Test: Additional build flags when building a container image #9415

Closed
2 tasks done
chrmarti opened this issue Jan 22, 2024 · 2 comments
Closed
2 tasks done

Test: Additional build flags when building a container image #9415

chrmarti opened this issue Jan 22, 2024 · 2 comments
Labels
containers Issue in vscode-remote containers testplan-item

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Jan 22, 2024

Refs: #3545

Complexity: 4

Create Issue


Dev Containers now supports building the container image with additional Docker CLI options.

Please test:

  • Use the latest version of the Dev Containers extension (currently 0.333.0-pre-release).
  • Use a Dev Container config with a Dockerfile, e.g.:
    • .devcontainer/devcontainer.json:
{
	"build": {
		"dockerfile": "Dockerfile",
		"options": [
			// add options here
		]
	}
}
  • .devcontainer/Dockerfile:
FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm
  • Add some build options (see https://docs.docker.com/engine/reference/commandline/image_build/). E.g., adding a label: "--label", "testbuildoption=success".
  • Reopen the folder in the dev container.
  • Verify the the build options are applied. E.g., by inspecting the log (F1 > Dev Containers: Show Container Log) or to verify the label was added you can inspect the image or container (which inherits the label) using the Docker CLI (docker inspect <image / container id>) or Docker extension (Inspect in container's context menu).
@chrmarti chrmarti added testplan-item containers Issue in vscode-remote containers labels Jan 22, 2024
@vscodenpa vscodenpa added this to the December / January 2024 milestone Jan 22, 2024
@alexr00
Copy link
Member

alexr00 commented Jan 23, 2024

@chrmarti I'm blocked on #9424

@alexr00 alexr00 removed their assignment Jan 23, 2024
@TylerLeonhardt TylerLeonhardt removed their assignment Jan 23, 2024
@TylerLeonhardt
Copy link
Member

Seems to be working! I added tag and it was reflected in Docker Desktop

@microsoft microsoft locked and limited conversation to collaborators Mar 8, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
containers Issue in vscode-remote containers testplan-item
Projects
None yet
Development

No branches or pull requests

4 participants