Build a Docker Image and Publish It to GCP GCR & Artifact Registry using Github Actions

  Рет қаралды 31,789

Anton Putra

Anton Putra

Күн бұрын

🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com
▬▬▬▬▬ Experience & Location 💼 ▬▬▬▬▬
► I’m a Senior Software Engineer at Juniper Networks (12+ years of experience)
► Located in San Francisco Bay Area, CA (US citizen)
▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬
► LinkedIn: / anton-putra
► Twitter/X: / antonvputra
► GitHub: github.com/antonputra
► Email: me@antonputra.com
▬▬▬▬▬▬ Related videos 👨‍🏫 ▬▬▬▬▬▬
👉 [Playlist] Kubernetes Tutorials: • Kubernetes Tutorials
👉 [Playlist] Terraform Tutorials: • Terraform Tutorials fo...
👉 [Playlist] Network Tutorials: • Network Tutorials
👉 [Playlist] Apache Kafka Tutorials: • Apache Kafka Tutorials
👉 [Playlist] Performance Benchmarks: • Performance Benchmarks
👉 [Playlist] Database Tutorials: • Database Tutorials
=========
⏱️TIMESTAMPS⏱️
0:00 Intro
0:31 Create GitHub Repository
1:17 Create Flask App
2:05 Create Docker Image for Flask App
2:58 Create Service Account in GCP
4:34 Create GitHub Actions Docker Build and Push Workflow
10:20 Use GitHub Actions to Push Docker to Artifact Registry
13:14 Increment Git Tag for Each Commit and Use It for Docker Image
=========
Source Code
🖥️ - GitHub: github.com/antonputra/lesson-087
🖥️ - GitHub: github.com/antonputra/tutoria...
#GitHubActions #GCP #GCR

Пікірлер: 53
@AntonPutra
@AntonPutra 10 ай бұрын
🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com
@alexleung842
@alexleung842 2 жыл бұрын
Pretty sure you just saved me 1 to 2 whole days' work. Subscribed!
@AntonPutra
@AntonPutra 2 жыл бұрын
Thanks!
@AntonPutra
@AntonPutra Жыл бұрын
👉 How to Manage Secrets in Terraform - kzfaq.info/get/bejne/abRgp6p83NymlHU.html 👉 Terraform Tips & Tricks - kzfaq.info/get/bejne/bblpZ9KGud-Wqmg.html 👉 ArgoCD Tutorial - kzfaq.info/get/bejne/sK2el8qVrMeVhJc.html
@josenildoalves
@josenildoalves 2 жыл бұрын
Excellent content. Congratulations on the knowledge transferred. Thank you very much.
@AntonPutra
@AntonPutra 2 жыл бұрын
Glad it was helpful!
@radeksmola1898
@radeksmola1898 Жыл бұрын
This helps me with creation of service account for Artifact Registry. Thank you.
@AntonPutra
@AntonPutra Жыл бұрын
welcome!
@user-ks2mu6cy4n
@user-ks2mu6cy4n 10 ай бұрын
Thank you very much! very helpful! 😋
@AntonPutra
@AntonPutra 10 ай бұрын
Thanks Roni!
@genyklemberg
@genyklemberg 7 ай бұрын
great, just what I was looking for)) Good that after subscribtion any youtube search now shows your results in top list) Documentation is so confusing without any practical usages)
@AntonPutra
@AntonPutra 6 ай бұрын
Cool, thanks. Use Artifact Registry, I think GCR will be deprecated soon.
@AmitKumar-hm4gx
@AmitKumar-hm4gx 5 ай бұрын
Great content, could you please let me know how to go about the same if I am not dealing with github but some other repo. My basic goal for the moment is to upload my dockerfiles to artifact registry
@bronxed3666
@bronxed3666 2 жыл бұрын
excellent content. thank you
@AntonPutra
@AntonPutra 2 жыл бұрын
Much appreciated!
@jameeghouri775
@jameeghouri775 Жыл бұрын
very helping. thanks
@AntonPutra
@AntonPutra Жыл бұрын
Thanks jamee!
@Buddha609
@Buddha609 Жыл бұрын
that was very helpfull, thanks
@AntonPutra
@AntonPutra Жыл бұрын
Glad it helped
@sashameltser7374
@sashameltser7374 2 жыл бұрын
Great topic Anton. Any chance you can show how to create PyPI repos using Artifact Registry. I think it would be awesome to see
@AntonPutra
@AntonPutra 2 жыл бұрын
Thank you for the suggestion!
@diegobloomalert929
@diegobloomalert929 2 жыл бұрын
Thank you Anton! There is a way to use docker layer caching for speed up this process on larger docker images?
@AntonPutra
@AntonPutra 2 жыл бұрын
Docker has a GitHub Action with ability to cache layers, maybe you can extract that part from there - github.com/docker/build-push-action/blob/master/docs/advanced/cache.md
@potatocoder5090
@potatocoder5090 Жыл бұрын
Thank you for this informative video! Would you be able to make a video about deploying and running containers from docker images in artifact registry to a GCE instance using GitHub Actions?
@AntonPutra
@AntonPutra Жыл бұрын
Sure sometime in the future
@rafinonato
@rafinonato Жыл бұрын
This is amazing, but I believe the syntax has changed in the last year. Would you be able to make a video on not only publishing to the artifact registry but also auto-deploying to a kubernetes cluster?
@AntonPutra
@AntonPutra Жыл бұрын
Sure, will do
@abdurrazaq8127
@abdurrazaq8127 2 жыл бұрын
Thank you
@AntonPutra
@AntonPutra 2 жыл бұрын
You're welcome
@fourirakbar5745
@fourirakbar5745 2 жыл бұрын
wow very nice tutorial, thank you! btw just curious, how to pull container image from private google artifacts registry in github actions?
@AntonPutra
@AntonPutra 2 жыл бұрын
your k8s service account that you use to create k8s nodes need to have object storage viewer access to the gs bucket with images
@thirumavalavanc8407
@thirumavalavanc8407 Жыл бұрын
Is that necessary to create a separate dockerfile in the repo to create a container image or if we mentioned the docker details in the workflow is enough to create a container image...
@AntonPutra
@AntonPutra Жыл бұрын
well you need a dockerfile or github action that can build one
@achala1100
@achala1100 2 жыл бұрын
Excellent, l have pushed to artifact
@AntonPutra
@AntonPutra 2 жыл бұрын
Thanks!
@m_sen8710
@m_sen8710 10 ай бұрын
Hi, at 2:10, what would the "production ready" image look like ?
@AntonPutra
@AntonPutra 10 ай бұрын
Well I was referring to the multistage docker build which is based either on scratch or distrolless image. Exampe - github.com/GoogleContainerTools/distroless/tree/main/examples/python3-requirements
@m_sen8710
@m_sen8710 10 ай бұрын
@@AntonPutra oh ok! Thank you 🙂
@user-zu6zj6vi5l
@user-zu6zj6vi5l Жыл бұрын
Excellent, i followed same but it is failing during pushing image to GCR, saying required permissions don't have on service account. Do you have any idea how that can be fixed?
@AntonPutra
@AntonPutra Жыл бұрын
see if they now require new set of permissions (gcp)
@olegderivedmed9285
@olegderivedmed9285 Жыл бұрын
Same for me. Did you find solution?
@olegderivedmed9285
@olegderivedmed9285 Жыл бұрын
Hello. I configured everything as you show but unfortunately I`m getting permissions denied on push step. For both cases.
@olegderivedmed9285
@olegderivedmed9285 Жыл бұрын
I even tried with "owner" permission for service account. Don`t works..
@AntonPutra
@AntonPutra Жыл бұрын
They recently released a new cloud functions that are based on cloud run service so far as I remember. Try to look into that
@christopherrobin5796
@christopherrobin5796 2 ай бұрын
then how to deploy to GCR?
@AntonPutra
@AntonPutra 2 ай бұрын
you mean GKE? well i have few tutorials on that topic
@pradeepg4498
@pradeepg4498 4 ай бұрын
How to use git lfs in gcloud
@AntonPutra
@AntonPutra 4 ай бұрын
I've never used it myself, why not to use object store? But i found one implementation for gcp - github.com/vitalibo/git-lfs/
@mklueh
@mklueh Жыл бұрын
It's now not recommended anymore to use key auth, but Workload Identity Federation instead
@AntonPutra
@AntonPutra Жыл бұрын
Noted
@novanova2906
@novanova2906 2 жыл бұрын
how to deploy GKE?
@AntonPutra
@AntonPutra 2 жыл бұрын
How to Create GKE Cluster Using TERRAFORM from Scratch? (GCP Shared VPC | Terraform GCP Kubernetes) - kzfaq.info/get/bejne/jrqTotZo2JbNdKM.html
@novanova2906
@novanova2906 2 жыл бұрын
@@AntonPutra how to Deploy the Docker image to the GKE cluster? used kustomize?
How to Create Your Own GitHub Actions?
14:23
Anton Putra
Рет қаралды 7 М.
How to build and push a docker image | Google Cloud Artifact Registry
11:22
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 5 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 33 МЛН
Docker Builds with GitHub Actions and Artifact Registry (GCP)
8:34
Nodematic Tutorials
Рет қаралды 7 М.
Cloud Run QuickStart - Docker to Serverless
7:50
Fireship
Рет қаралды 182 М.
How to debug Kubernetes? (Deployments, Services & Ingress)
18:45
How to use Github Actions with Google's Workload Identity Federation
11:33
Manually Deploy to Cloud Run - Updated for Artifact Registry
11:04
ScriptBytes
Рет қаралды 4,5 М.
you need to learn Docker RIGHT NOW!! // Docker Containers 101
23:19
NetworkChuck
Рет қаралды 2,6 МЛН
Pushing Docker Images to Google Cloud Platform Container Registry
9:51
Tech With Otabek
Рет қаралды 2,4 М.
Как противодействовать FPV дронам
44:34
Стратег Диванного Легиона
Рет қаралды 98 М.
Yanlışlıkla Telefonumu Parçaladım!😱
0:18
Safak Novruz
Рет қаралды 817 М.
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 2,4 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,8 МЛН