Hey Valentin! I have only two subscriptions, one is for Dave2D and one for you. This is what I am looking for, I already bought one of you Udemy course to dig deeper in GitLab. Thanks for the great instructions and the very clarified description. I am trying to learn as much as I can beside my 5 days old second son :D
I personally understand the thought that its bad practice to use latest.. but IMO.. it needs to be tested somewhere.. and for my personal proejcts I set latest.. so that at any time if something does break.. I find out about it right away.. otherwise things just run smoothly.. but I get in a job site that might not be tolerable to others
Hey Valentin, does this automatically do 'Docker Layer Caching' while building the image or do I have to do some additional configurations. I am currently using AWS ECR and every time I build the image it takes too long because the gitlab runner does not have a reference to the previously built image. Can you please clarify this. Thanks in advance.
@@brahamaggarwal1800 By design, each job is started in a new Docker image. So there are no previous builds or cache that can be reused. How long does it take?
I have build a docker image locally and push it to a registry that can be reached publicly (needed sign in ofc), but whenever I tried to use this image from gitlab runner after the before script to sign in it alwasys complianed the image pull failure..
I adjust an image that have all dependencies inside of it. Is this the nearest or the exact process that I should do? I only need gitlab runner to fetch image from local not from docker hub but I couldn't find a way and this tutorial is similar to what I wanted. Am I wrong?
how can I use my custom image as a base image in my Dockerfile? For example, my base image has all the dependencies and I want to use it to build my project. Is this possible? I tried to use it like so but it doesn't work: FROM /myuser/myproject/base:v1.0.0 any ideas?
oh... your title is kinda easy to missunderstand, i was looking for a way to "Build & Use Custom Docker images in your GitLab CI/CD pipeline" specifically i want to BUILD images, from INSIDE the gitlab CI/CD pipeline do you by any chance have any solution for this?
Why build the Docker image on a schedule? Won’t it just build and push the same thing as it did the previous day if the Dockerfile hasn’t changed. And, if the Dockerfile has changed, wouldn’t you want to build a new image right away? Also, does it make sense to create and use a new tag each time the Dockerfile changes?
I got your setup but.. when i go to apt install anything it says source not found? using ubuntu:20.04 it cannot find things as simple as apt install python3 .. I will go to the gitlab community next to see what I missed.. thanks for the great video tho to kick start my efforts
Thanks for the video. I run this code to create a custom docker image but i get an error saying: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running? Any idea how can I solve this problem? I already set tls=false but still not working
Want to have ME be your GitLab & DevOps teacher? 🤔
Here's how: vdespa.com/courses/
Hey Valentin! I have only two subscriptions, one is for Dave2D and one for you. This is what I am looking for, I already bought one of you Udemy course to dig deeper in GitLab. Thanks for the great instructions and the very clarified description. I am trying to learn as much as I can beside my 5 days old second son :D
I appreciate that, Daniel. Thank you! Take it easy with learning, make it fun, not a burden ;)
AMAZING CI/CD tutorial, but just to make it the best ever a link to the repo would be great.
You are welcome. Thank you for leaving a comment.
cool & perfect
Thanks a lot
You are welcome. Thank you for leaving a comment.
Good one ,, can we see from scratch about git and there setup with Linux machine and how and where image and containers going to
I think this part should be in your CI/CD udemy course with deploying this image
Thanks for your suggestion. I am expanding the course to include Docker as well.
I personally understand the thought that its bad practice to use latest.. but IMO.. it needs to be tested somewhere.. and for my personal proejcts I set latest.. so that at any time if something does break.. I find out about it right away.. otherwise things just run smoothly.. but I get in a job site that might not be tolerable to others
Can you show how to use Kaniko, Buildah, Podman
it's great thanks you
You are welcome!
Do I need to add the code below if I dont have docker in local and only want to build a custom docker in GitLab?
services:
- docker:dind
Nice video, thanks for you work!
Would you be able to create a tutorial for building your own docker images locally?
Thanks. You can use the same commands I have shown you locally as well.
Hey Valentin, does this automatically do 'Docker Layer Caching' while building the image or do I have to do some additional configurations. I am currently using AWS ECR and every time I build the image it takes too long because the gitlab runner does not have a reference to the previously built image. Can you please clarify this.
Thanks in advance.
@@brahamaggarwal1800 By design, each job is started in a new Docker image. So there are no previous builds or cache that can be reused. How long does it take?
I have build a docker image locally and push it to a registry that can be reached publicly (needed sign in ofc), but whenever I tried to use this image from gitlab runner after the before script to sign in it alwasys complianed the image pull failure..
on my personal gitlab instance i had to register the gitlab runner with the shell executor,
then i had to use docker:20.10.10-dind for image
If you are using a shell executor, any image you specify in your pipeline config is ignored.
how did you handle the pull policy? if it is "if-not-present" the job never pull again your new image, but it will take always the previous...
Good point. The safest way is to use tags.
@@vdespa mm, difficult to automate in this case. You should change the tag manually in some point...
@@lorenzorava7511 I mean there is not single solution for all problems. You need to test different options and see what works for you.
I adjust an image that have all dependencies inside of it. Is this the nearest or the exact process that I should do? I only need gitlab runner to fetch image from local not from docker hub but I couldn't find a way and this tutorial is similar to what I wanted. Am I wrong?
how can I use my custom image as a base image in my Dockerfile?
For example, my base image has all the dependencies and I want to use it to build my project. Is this possible? I tried to use it like so but it doesn't work:
FROM /myuser/myproject/base:v1.0.0
any ideas?
What is advantage of creating and using a yaml ci build file over a Dockerfile to create your image?
you still use a Dockerfile -- this CI yaml just gives the gitlab runner the instructions on executing docker build
oh... your title is kinda easy to missunderstand, i was looking for a way to
"Build & Use Custom Docker images in your GitLab CI/CD pipeline"
specifically i want to BUILD images, from INSIDE the gitlab CI/CD pipeline
do you by any chance have any solution for this?
Why build the Docker image on a schedule? Won’t it just build and push the same thing as it did the previous day if the Dockerfile hasn’t changed. And, if the Dockerfile has changed, wouldn’t you want to build a new image right away? Also, does it make sense to create and use a new tag each time the Dockerfile changes?
Good points. Well, it depends. What if you don't use a tag in your base image?
But yes, using tags makes sense.
What if I have a docker-compose file ?
"docker-compose build -t $CI_REGISTRY_IMAGE ." does not work
How can I tag docker-compose ?
I got your setup but.. when i go to apt install anything it says source not found? using ubuntu:20.04 it cannot find things as simple as apt install python3 .. I will go to the gitlab community next to see what I missed.. thanks for the great video tho to kick start my efforts
I suggest taking an image that already has python.
Thanks for the video. I run this code to create a custom docker image but i get an error saying:
Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?
Any idea how can I solve this problem? I already set tls=false but still not working
Hey Mauro, are you using the shared runners from GitLab.com or are you self-hosting...?
@@vdespa hi, I'm using self-hosted
@@TheMaurober Please see the Troubleshooting part of this article. medium.com/p/b63b91a58728
@@vdespa Thanks!!
I want to push a Java image to ECR, then how to make a CD?
For ECR, please watch this tutorial: ruclips.net/video/jg9sUceyGaQ/видео.html
you did the build... but not the use...
i am impressed how bad and unclear this video is
Let me know if you have any questions and what is unclear?
Thanks for the video! I am having this issue
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Try using the shared runners from GitLab.com
when i'm login, message return
error during connect: Post "docker:2375/v1.24/auth": dial tcp: lookup docker on 8.8.8.8:53: no such host
I get this error: "error during connect: Post "docker:2375/v1.24/auth": dial tcp: lookup docker on **:53: no such host" ---- Anyone know the solution?
Dito. Would also be interested in a solution.
you need to use tcp:// not http its not a web server