How to test a Docker container in GitLab CI

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2024

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

  • @vdespa
    @vdespa  3 ปีที่แล้ว +1

    Want to have ME be your GitLab & DevOps teacher? 🤔
    Here's how: vdespa.com/courses/

    • @christopherlim2957
      @christopherlim2957 3 ปีที่แล้ว +1

      @Valentin Despa
      Thank you for making this video and it cleared my blocker.
      Anyway, I also figured out that my Dockerfile is incorrectly configured which is why I am still getting some issues even following your example.
      But after fixing my Dockerfile, it runs perfectly fine. Again, thank you so much!

    • @vdespa
      @vdespa  3 ปีที่แล้ว

      @@christopherlim2957 I am glad it helped!

  • @york0m1
    @york0m1 3 หลายเดือนก่อน

    I was stuck on this for hours. You explained it perfectly!
    Liked, subscribed and will be watching more of your stuff!

    • @vdespa
      @vdespa  3 หลายเดือนก่อน

      Awesome, thank you!

  • @andyrees8193
    @andyrees8193 3 หลายเดือนก่อน +1

    Thank you so much for such a clear explanation of a topic that is almost universally explained really poorly, your video was a godsend, have my sub, thumbs up and thanks.

    • @vdespa
      @vdespa  3 หลายเดือนก่อน

      @@andyrees8193 thanks, Andy!

  • @kenwang8595
    @kenwang8595 11 หลายเดือนก่อน

    Excellent tutorial. In just a few minutes, I learned quite a bit bit , and it is just relevant to what I am trying to do, conceptually.

    • @vdespa
      @vdespa  11 หลายเดือนก่อน

      Great to hear, thanks for your kind comment.

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

    love the flow! just the right amount of details! thanks!

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

      Glad you liked it! Thank you so much for watching it.

  • @Neteruss
    @Neteruss 3 ปีที่แล้ว +2

    It's so useful tutorial! I just was looking for something like this, ESPECIALLY with comments where is what running -- it's so important. Once again thank you so much!
    BTW, it'd be so nice to see something similar but for 'GitLab Runner Helm Chart' how we can deploy simple microservice app? how we can communicate with environment from previous stage 'build', how to properly use "Infrastructure > kubernetes" menu?
    Thank you so much in advance.

    • @vdespa
      @vdespa  3 ปีที่แล้ว +1

      Glad it was helpful! Thanks for your suggestions. I am working on new content, so stay tuned :)

  • @TheSydtube
    @TheSydtube 3 หลายเดือนก่อน

    Could you please tell how to get the applicaion logs running as service via a network.

  • @pisckipratama9529
    @pisckipratama9529 2 ปีที่แล้ว +1

    This is a good tutorial, I got insight from this video.
    And I want to ask, if using docker run command we can put -p 3000:3000 to expose, how services can define that image running or expose on port 3000?
    Thanks

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      All ports that the container exposes should be mapped. Notice that when I am using cURL i am specifing 3000 port.

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

    Can I have an example to with jmeter?

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

    Hi! We didn't map any port when used services. Did it map a port from Dockerfile EXPOSE command automatically to the same external port? Or it's just internal container ports are made available?

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

      @@ILyaCyclone AFAIK, whatever ports the container exposed are also available without any additional mapping.

  • @ankitshukla5800
    @ankitshukla5800 3 ปีที่แล้ว +1

    Keep it up 👏

    • @vdespa
      @vdespa  3 ปีที่แล้ว

      Thanks, Ankit!

  • @miguelv2985
    @miguelv2985 2 ปีที่แล้ว

    Hi Valentin, do you know if there's an available windows runner that has docker in Gitlab?

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      I am not 100%, but try adding the tag windows to your job and see.

  • @samrids6393
    @samrids6393 2 ปีที่แล้ว

    Is it possible to run these tests BEFORE pushing the image to the repo?

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Yes, that should be possible as well.

  • @GusLapchatiy
    @GusLapchatiy 3 ปีที่แล้ว

    Hello, nice tutorial. What if I have, just saying, node.js image, and inside this image I execute docker run command, and then I want to connect to the created container? How do I do that?

    • @vdespa
      @vdespa  3 ปีที่แล้ว

      Show me how you start a docker image inside q node.js Image and i will show you how to connect to it.

  • @miguelv2985
    @miguelv2985 2 ปีที่แล้ว

    Hi Valentin, when I use docker run -d -p 3000:3000 it says its unable to find it the docker image. I did verify that its in the gitlab container registry. Any thoughts?

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Are you sure you have the right name?

    • @miguelv2985
      @miguelv2985 2 ปีที่แล้ว

      @@vdespa Thanks for the quick reply. It looks like in your example the everything is in the same yaml (building the image and testing the image). In my case, I have a separate Gitlab project which builds the docker image (dockerfile) and a second project that pulls my docker image and use it to start jobs. My issue is with the second project not able to access the CLI that I installed in the docker image.

  • @coreybonnette5787
    @coreybonnette5787 2 ปีที่แล้ว

    i still get connection refused issue even after changing localhost to docker. any ideas why? works fine locally

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Can you share more details about your setup, including the full error that you're getting?

  • @amitshah4049
    @amitshah4049 2 ปีที่แล้ว

    Using GITLAB can I PUSH DOCKER IMAGE TO any Window server as this is my hosting server, if YES THEN can you please provide us the steps or any video

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Which commands are you using to push the docker image?

    • @amitshah4049
      @amitshah4049 2 ปีที่แล้ว

      @@vdespa I have requirement as follow:
      1. I am buildng any Application using CI from GITLAB
      2. After building creating DOCKER Images.
      3. Same DOCKER Images it should automatically deploy to WINDOWS server whr I hv docker HUB and docker already installed.
      Now I Need code which I can write in YAML files it should push Docker Image to Windows server and appplication should run.

    • @amitshah4049
      @amitshah4049 2 ปีที่แล้ว

      Any help with above request

  • @disrael2101
    @disrael2101 3 ปีที่แล้ว +1

    Make a project using docker and explain every line would be better this one is confusing and not for beginners

    • @vdespa
      @vdespa  3 ปีที่แล้ว

      Thanks for your feedback. Yes, this is not a basic tutorial. What are you trying to do with Docker? Build and deploy an application?