#8:GitLab CI Build Docker Image and Push to Docker Hub | Push Docker Image to Docker Hub GitLab CI

Published: 16 September 2021
on channel: DevOps Hint
6,324
70

In this video we are going to perform GitLab CI Build Docker Image and Push to Docker Hub | Push Docker Image to Docker Hub using GitLab CI CD Pipeline
#pushdockerimagetodockerhub #gitlabcicd #gitlabtutorial
0:00 Introduction
3:20 GitLab CI Build Docker Image and Push to Docker Hub


Please find below GitLab CI Build Docker Image and Push to Docker Hub gitlab-ci.yaml code


stages:
- build
- build-docker-image
- push-image-to-docker-hub

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 devopshint/java-maven .
Push Docker Image to DockerHub:
stage: push-image-to-docker-hub
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
script:
- docker info
- docker push devopshint/java-maven

Complete GitLab CI CD Pipeline Tutorial for Beginners
https://www.fosstechnix.com/gitlab-ci...


Watch video #8:GitLab CI Build Docker Image and Push to Docker Hub | Push Docker Image to Docker Hub GitLab CI online without registration, duration hours minute second in high quality. This video was added by user DevOps Hint 16 September 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 6,324 once and liked it 70 people.