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

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


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

View it at Youtube

Most Popular