How to test a Docker container in GitLab CI

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

Комментарии • 33

  • @vdespa
    @vdespa  2 года назад +1

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

    • @christopherlim2957
      @christopherlim2957 2 года назад +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  2 года назад

      @@christopherlim2957 I am glad it helped!

  • @andyrees8193
    @andyrees8193 День назад +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  День назад

      @@andyrees8193 thanks, Andy!

  • @york0m1
    @york0m1 17 дней назад

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

    • @vdespa
      @vdespa  17 дней назад

      Awesome, thank you!

  • @kenwang8595
    @kenwang8595 8 месяцев назад

    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  8 месяцев назад

      Great to hear, thanks for your kind comment.

  • @Neteruss
    @Neteruss 2 года назад +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  2 года назад +1

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

  • @ankitshukla5800
    @ankitshukla5800 2 года назад +1

    Keep it up 👏

    • @vdespa
      @vdespa  2 года назад

      Thanks, Ankit!

  • @lywatanak8594
    @lywatanak8594 8 месяцев назад

    Can I have an example to with jmeter?

  • @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.

  • @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?

  • @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.

  • @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.

  • @GusLapchatiy
    @GusLapchatiy 2 года назад

    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  2 года назад

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

  • @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.

  • @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 2 года назад +1

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

    • @vdespa
      @vdespa  2 года назад

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