Created
October 25, 2019 07:30
-
-
Save numToStr/454bf6313734cc8e41d77be84ace52a9 to your computer and use it in GitHub Desktop.
Sample vscode task for building and deploy docker images to elastic beanstalk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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