In this Video we are going to cover GitLab CI Build and Push Docker Image to AWS ECR | GitLab CI CD Docker AWS | Push Image to ECR
#gitlabcicddockeraws #gitlabcicd #pushimagetoecr
0:00 Introduction
5:00 GitLab CI Build and Push Docker Image to AWS ECR
Please find below Gitlab-ci.yml to GitLab CI Build and Push Docker Image to AWS ECR
variables:
DOCKER_REGISTRY: 908198849120.dkr.ecr.ap-south-1.amazonaws.com
APP_NAME: mavenapp
TAG: "$CI_COMMIT_SHORT_SHA-$CI_PIPELINE_ID"
stages:
- build
- build-docker-image
- push-image-to-aws-ecr
build-java-project:
stage: build
script:
mvn package
artifacts:
paths:
- /home/gitlab-runner/
build-docker-image:
stage: build-docker-image
script:
- docker info
- docker build -t $DOCKER_REGISTRY/$APP_NAME:"$TAG" .
Push Docker Image to AWS ECR:
stage: push-image-to-aws-ecr
image:
name: $DOCKER_REGISTRY/$APP_NAME:"$TAG"
services:
- docker:dind
script:
- aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin $DOCKER_REGISTRY
- docker tag $DOCKER_REGISTRY/$APP_NAME:"$TAG" $DOCKER_REGISTRY/$APP_NAME:"$TAG"
- docker push $DOCKER_REGISTRY/$APP_NAME:"$TAG"
Complete GitLab CI CD Pipeline Tutorial for Beginners
https://www.fosstechnix.com/gitlab-ci...
Смотрите видео #10:GitLab CI Build and Push Docker Image to AWS ECR | GitLab CI CD Docker AWS | Push Image to ECR онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь DevOps Hint 22 Сентябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 7,273 раз и оно понравилось 82 людям.