Docker Builds with GitHub Actions and Artifact Registry (GCP)

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ค. 2024
  • In this guide, we demonstrate how to automatically build Docker images using GitHub Actions and push these images to Google's Artifact Registry. This will be useful if you intend to use these Docker images in services like Google's Kubernetes Engine or Cloud Run.
    Demonstration Code: github.com/nodematiclabs/gith...
    Free Trial Diagram Tool: softwaresim.com/pricing/ ("TH-cam24" for 25% Off)
    If you are a cloud, DevOps, or software engineer you’ll probably find our wide range of TH-cam tutorials, demonstrations, and walkthroughs useful - please consider subscribing to support the channel.
    0:00 Conceptual Overview
    0:52 Artifact Registry Repository
    1:38 Docker and GitHub Actions Code
    4:23 GitHub Repository and Secrets Setup
    7:20 Commit, Push, and Test
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 16

  • @placideirandora7405
    @placideirandora7405 9 หลายเดือนก่อน +1

    Thank you for the tutorial. I followed along and was able to deploy my image flawlessly!

  • @manuelsilveriof
    @manuelsilveriof 5 หลายเดือนก่อน

    Very well explained. Right to the point, thank you!

  • @gourabchakrabortyiiitdharw3754
    @gourabchakrabortyiiitdharw3754 8 หลายเดือนก่อน

    I was stuck on this for 1 day... finally this neat tutorial unblocked me. Thank you so much !!

  • @blight4519
    @blight4519 ปีที่แล้ว

    Amazing work

  • @tonmoy7203
    @tonmoy7203 ปีที่แล้ว

    Best Tutorial❤❤❤

  • @nachobalasch
    @nachobalasch ปีที่แล้ว

    Thank you very much

  • @robertmaloney860
    @robertmaloney860 9 หลายเดือนก่อน

    This is an incredible video! Did you plan on a followup about how to get it from artifact registry to the compute instance?

    • @nodematic
      @nodematic  9 หลายเดือนก่อน

      Thanks! We have a follow-up video on using the image in Google Kubernetes Engine, but not Compute Engine. We'll try to make a video on the Compute Engine side though.
      th-cam.com/video/7NyJWuRHQDA/w-d-xo.html

  • @facundopellicer7514
    @facundopellicer7514 7 หลายเดือนก่อน

    Great explanation! Why not use docker/setup-buildx-action, docker/build-push-action to build and push the image to the gcf artifact?

    • @nodematic
      @nodematic  7 หลายเดือนก่อน +1

      That could work as well, but since the docker commands are very simple (and most people are familiar with the syntax), we decided to go that direction. Either way should be good.

  • @yinmudino1
    @yinmudino1 8 วันที่ผ่านมา

    I am a bit lost at 5.26min when you can do 'git add .' in the cloud shell. I created the new repo at github. But when I switch to the cloud shell, i dont see any link connecting to github. The error said fatal: not a git repository (or any parent up to mount point /)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

    • @nodematic
      @nodematic  8 วันที่ผ่านมา

      Make sure you do a "git init" when you are in the right directory, to make your working directory a git repository. Then, you can "git add", push to GitHub, etc..

  • @andreawijayakusuma6008
    @andreawijayakusuma6008 9 หลายเดือนก่อน

    wait, how about docker cli command, I didn't see the docker install on that pipeline. when I following your code, error docker command not found. btw I using github runner on VM GCP

    • @nodematic
      @nodematic  9 หลายเดือนก่อน

      The default ubuntu-latest managed runner on GitHub Actions has docker preinstalled. If you're using a GCP VM runner, you'll need to install docker on that runner before you can successfully execute the workflow. I wouldn't suggest doing the cli installation in the GitHub Actions workflow - either do it manually or with infrastructure automation tools.

    • @andreawijayakusuma6008
      @andreawijayakusuma6008 9 หลายเดือนก่อน

      @@nodematic btw, if I created 2 YML file on folder .github/workflows/ and I push to Github, did both YML pipeline will be running or not and also it is possible to run only 1 YML pipeline file on that case ?

    • @nodematic
      @nodematic  9 หลายเดือนก่อน

      Both pipelines will run. You would need to use the trigger ("on" keyword) system for when to run each and, no, I don't believe there's a way to use the presence of other workflows as a condition for triggering.