Build Docker images with GitLab CI and push to GitLab Container Registry

preview_player
Показать описание
In this tutorial, I will demonstrate how you can use a GitLab CI template to build a Docker image and push it to the built-in GitLab Container Registry.

___

// GitLab CI/CD ONLINE COURSE

👉 Want to learn more about CI/CD pipelines? Check my GitLab CI online course.

Get it at a special price and help support this YouTube channel:

___

// I HAVE A QUESTION!

I do my best to answer all comments here on YouTube but I cannot make any guarantees.

___

// I HAVE A VIDEO IDEA

Do you want me to create a video on a specific topic? Just fill out the form below:

___

// P L A Y L I S T S

___

// F R E E R E S O U R C E S

▸▸▸ Official Gitlab CI documentation

▸▸▸ 👉 Subscribe to the "Testing and automation with Valentine" newsletter for bi-weekly tutorials, tips, and news from the industry.

___

// YOUR SUPPORT ON PATREON MATTERS

If you enjoy this content, help me create more like this. Consider supporting me on Patreon.

___

// IMPRINT

---
Рекомендации по теме
Комментарии
Автор

👉 Want to learn more about CI/CD and DevOps? Check my Gitlab CI online course.

vdespa
Автор

I spent hours trying to get this done, but on the basis of this video I finally managed. Thanks!

knvlytr
Автор

I'm just going to start searching YouTube before going to Google or stack overflow. 🤣

I just spent the better part of two days trying to figure out how to cleanly accomplish what you just did in minutes. Thanks!

MichaelRainabbaRichardson
Автор

Excellent video. Just what I was looking for. Thanks!

BradleyHerbst
Автор

I was a little sceptical when I saw the length of the video - But actually its a great format, precise and to the point..

EViL
Автор

Nice reproducible example and simply explained. This is amazing. Thanks mate!

MrJatan
Автор

Great and clear explanation! I guess it's the name that does it :).

specthanatos
Автор

Wow, you got me, I'm gonna press the subscribe button right now

Gdario
Автор

Thank you Valentin! Its short and very well explained tutorial. I would like to ask how we can combine this for also pushing images into AWS ECR with specified tags.

berkesenturk
Автор

How did you get the container registry beacuse i am not able to get it in my git lab. whare those variable set which is use in docker login.

sambhavsharma
Автор

Hi Bro I have scenario like..I have pom.xml.and simple hello world application in gitlab...need to create dockerfile and docker image need to build automatically....and need to create .gitlab-ci.yml...then after we need to mention our ubuntu vm ssh credtional..then that hello world will publish in server

yugendharsai
Автор

Hi Valentin, thank you for going over this, it makes a bit more sense. I do have a question. Within the gitlab-ci.yml file, I am wanting to build an image and run unit tests then get the result of those tests to output within the 'Jobs' portion of ci, any suggestions on how to do that? I know you can run unit tests using the Dockerfile file directly in your app, but that isn't what im after in the instance.

mxgundy
Автор

Thanks very usefull, need somemore videos on how to deploy to Aks or Eks.

kumars
Автор

Thanks for share!
How about having two stages (build and deploy) where deploy stage is responsible to push image only if is a merge request, branch master and have tags using cached image ? Note, build and deeply will run in different runners.

antoniomarques
Автор

Thanks for video, It is really useful, but in my pipeline i am getting Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? error

BhagyaLakshmi-cqiu
Автор

Very useful content. I have a question. Can I add output(artifacts) from the build stage into the docker image?

kayakfx
Автор

how to use the image from the registry for a container?

naheliegend
Автор

Hi and thanks for the video ! once I generated my image in the registry, what's the next step and where jenkins is used ? thanks !

thourayasboui
Автор

hi bro, upto this i made i need to deploy this latest image to a vm machine and run it on a anybody knows please tell...

antonypraveen
Автор

What are the pros/cons of building docker images this way versus using the shell executor?

Jdiddy