feat: add buildx task
This commit is contained in:
37
.vscode/tasks.json
vendored
37
.vscode/tasks.json
vendored
@@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
"label": "docker-compose-up",
|
"label": "docker-compose-up",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "docker compose -f docker-compose.dev.yml up --build",
|
"command": "docker compose up --build",
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,40 @@
|
|||||||
{
|
{
|
||||||
"label": "docker-compose-down",
|
"label": "docker-compose-down",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "docker compose -f docker-compose.dev.yml down --volumes"
|
"command": "docker compose down --volumes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Docker: Build and Push Production Image",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "docker",
|
||||||
|
"args": [
|
||||||
|
"buildx",
|
||||||
|
"build",
|
||||||
|
"--platform",
|
||||||
|
"linux/amd64,linux/arm64",
|
||||||
|
"--target",
|
||||||
|
"production",
|
||||||
|
"-t",
|
||||||
|
"git.twk95.net/twk95/eleventy:latest",
|
||||||
|
"-t",
|
||||||
|
"git.twk95.net/twk95/eleventy:${input:version}",
|
||||||
|
".",
|
||||||
|
"--push"
|
||||||
|
],
|
||||||
|
"problemMatcher": [],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"detail": "Builds and pushes a multi-platform production image to your container registry."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"id": "version",
|
||||||
|
"type": "promptString",
|
||||||
|
"description": "Enter the version tag for the image (e.g., 1.0.0)",
|
||||||
|
"default": "1.0.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user