Skip to content

Instantly share code, notes, and snippets.

@numToStr
Created October 25, 2019 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numToStr/454bf6313734cc8e41d77be84ace52a9 to your computer and use it in GitHub Desktop.
Save numToStr/454bf6313734cc8e41d77be84ace52a9 to your computer and use it in GitHub Desktop.
Sample vscode task for building and deploy docker images to elastic beanstalk
{
"version": "2.0.0",
"tasks": [
{
"label": "Build React",
"type": "shell",
"command": "npm run build",
"presentation": {
"showReuseMessage": false
}
},
{
"label": "Build Image",
"type": "shell",
"command": "docker build --rm -f \"Dockerfile\" -t <image_name> .",
"group": "build",
"dependsOn": ["Build React"],
"presentation": {
"showReuseMessage": false
}
},
{
"label": "Tag Image",
"type": "shell",
"command": "docker tag <image_name> <ecr_repo>",
"problemMatcher": [],
"group": "build",
"dependsOn": ["Build Image"],
"presentation": {
"showReuseMessage": false
}
},
{
"label": "Push Image",
"type": "shell",
"command": "docker push <ecr_repo>",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": ["Tag Image"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment