Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Created June 16, 2020 03:45
Show Gist options
  • Save jsturtevant/4c7985c2cd82a4f8d86124699f3d82eb to your computer and use it in GitHub Desktop.
Save jsturtevant/4c7985c2cd82a4f8d86124699f3d82eb to your computer and use it in GitHub Desktop.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch file",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${file}"
},
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceRoot}/cmd/buildx/main.go",
"env": {},
"args": [
"build",
"--no-cache",
"--pull",
"-o",
"type=docker,dest=${workspaceRoot}/test/test.out",
"--build-arg",
"nanoserverTag=mcr.microsoft.com/windows/nanoserver:1809",
"--platform",
"windows/amd64",
"-t",
"test",
"-f",
"${workspaceRoot}/test/Dockerfile",
"${workspaceRoot}/test/."
],
"preLaunchTask": "builder",
"postDebugTask": "rmbuilder"
}
]
}
Example VS Code files for debugging docker [buildx](https://github.com/docker/buildx)
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "builder",
"type": "shell",
"command": "docker buildx create --name img-builder --use"
},
{
"label": "rmbuilder",
"type": "shell",
"command": "docker buildx rm img-builder"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment