Docker For Golang - How To Containerize A Golang Project

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

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

  • @yogeshdharya3857
    @yogeshdharya3857 Год назад +1

    1:16 For somebody who is beginner who is beginning with dockerising go lang projects ! Dude u are definitely talking about me

  • @madhavnelluri237
    @madhavnelluri237 Год назад +2

    Hello, please provide me link for dockerize the appilication with mongodb

  • @arpitsingh3365
    @arpitsingh3365 11 месяцев назад

    Can anyone share the link of the advanced docker with golang project he's talking about

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

    That was really good. Thanks.

  • @LEGnewTube
    @LEGnewTube Год назад

    Did you end up creating the more advanced videos you mentioned at the beginning. Not finding them on your channel

    • @AkhilSharmaTech
      @AkhilSharmaTech  Год назад

      hi bro, the video streaming project series was supposed to have a lot of advanced concepts. i was never able to complete the videos for it as it was just too big of a project. but i did put the complete code on github for it

    • @AkhilSharmaTech
      @AkhilSharmaTech  Год назад

      also, join the discord community for more learnings and info, link is in the bio

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

    Such a nice video!!!

  • @ragsbigfella
    @ragsbigfella 2 года назад +3

    Hello Akhil.. thank you for this video. I created my first docker go app using this. Only one suggestion. The background music is a bit louder than your voice. If possible, please remove it. Thank you.

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

      Hey thanks for suggestion
      I've stopped using background music in recent videos

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

    Amazing video! Still working my way through this playlist, and it seems like you're giving us the perfect toolkit to become a full Go developer.

  • @forvm2051
    @forvm2051 Год назад

    Thanks for the video! One question is in that Dockerfile, what is the difference between "RUN" and "CMD"?

  • @WrestlingBattle
    @WrestlingBattle 3 года назад

    Hello, why you used EscapeString method here, can we not do without it?

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

    Hi,Akhil
    Can you make more video related to dockerize golang application

  • @nileshdudhatra3113
    @nileshdudhatra3113 Год назад

    Thanks sir for this video.

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

    sir, what if we have more packages?

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

    isn't golang the best for containerization?

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

    great explanation. one thing for later go versions looks like you need to do “RUN go mod init demo” before the “RUN go build”.

    • @nedlar6241
      @nedlar6241 7 месяцев назад

      Hi! 2 years ago you probably won't see this....
      But I am getting the problem ``unable to start container process: exec: "./app/main": stat ./app/main: no such file or directory: unknown.``
      Is this the problem?
      I did RUN go mod init 3-go-with-docker (my folder name) but nothing changed...

    • @nedlar6241
      @nedlar6241 7 месяцев назад

      I've also tried putting your solution further up with the local new directory name but no help
      FROM golang:1.12.0-alpine3.9
      # make a directory in the image
      RUN mkdir /app
      # take all local files into my image app folder
      ADD . /app
      RUN go mod init app
      #COPY *.go ./
      # workdir is a command to tell docker that this is our main directory to run commands from
      WORKDIR /app
      # RUN go mod init 3-go-with-docker
      RUN go build -o main .
      # go into directory and run the executable
      CMD ["./app/main"]

  • @kave_08
    @kave_08 3 года назад

    hey buddy
    first of all thank you, I like your tutorial please share more about go web services and some stuff about massage buss ...
    second is you use calm music in your background and its so amazing keep doing it's so cool!

    • @AkhilSharmaTech
      @AkhilSharmaTech  3 года назад +2

      hi bro, thanks a lot for watching, recently in my videos i have removed the music as people were complaining that the music is distracting lol.
      i have a new project that uses rabbitmq for message bus and we use multiple microservices, this series is called - "monolith to microservice project", do check it out.
      also, connect with me on linkedin, you will find my profile link in the description box of the latest videos :)

    • @kave_08
      @kave_08 3 года назад

      @@AkhilSharmaTech sounds good, I'll wait for watch your new videos
      Br

    • @AkhilSharmaTech
      @AkhilSharmaTech  3 года назад +1

      @@kave_08 I have already started that series,
      Please search my channel monolith to microservices

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

    Thanks bro, great video. What does that -O mean , and why dont we have to run command go.run main.go but only go build -o in Dockerfile? thanks for clarification

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

      Bro I have did everything like you, it is the same and it wont start server, says no response, but there are no errors anywhere I checked multiple times..I have docker installed also running. What can it be? Thank you very much

  • @mikees8448
    @mikees8448 3 года назад

    Hi Akhil, Was able to create executable file after running the docker build command. Checked under 'docker image ls' and it came successful. Ran 'docker run -p 8080:8081 -it docker-test' and there was no error. However opening in localhost:8080 showed error "problem loading file..." Where did I go wrong?

    • @AkhilSharmaTech
      @AkhilSharmaTech  3 года назад

      Hi mikee, is the " problem loading file " in this case, a golang error or a docker error ?

    • @mikees8448
      @mikees8448 3 года назад

      @@AkhilSharmaTech Ran locally without docker and was able to run main.go so then the issue must be with running locally on docker. Plz suggest. Thanks!

    • @AkhilSharmaTech
      @AkhilSharmaTech  3 года назад

      @@mikees8448 ok got it, so the step in docker file where you copy the go file into the docker container, that's where something is going wrong - maybe a type in the name of the file? or something to do with docker not getting the required file permission to do this? if you're on ubuntu, login as a sudo user?

    • @mikees8448
      @mikees8448 3 года назад

      @@AkhilSharmaTech I got it running finally, thanks! actually I had missed running the build "RUN go build -o main ."

    • @AkhilSharmaTech
      @AkhilSharmaTech  3 года назад

      @@mikees8448 awesome bruh

  • @alextotun
    @alextotun 5 месяцев назад

    Why you turn music.) Why?

    • @AkhilSharmaTech
      @AkhilSharmaTech  5 месяцев назад

      new videos don't have it bro, please check them out

  • @busra9995
    @busra9995 3 года назад

    Hi Akhil, when i run "docker run -p 8080:8081 -it docker-test" command, i get error 'no reachable servers'. why do you think it is not sending data to localhost

    • @GaneshYadav-gf7cr
      @GaneshYadav-gf7cr Год назад

      what port num have you mentioned in your main.go file?

  • @shubhambhardwaj8894
    @shubhambhardwaj8894 10 месяцев назад

    Please don't use background music, thanks👍

    • @AkhilSharmaTech
      @AkhilSharmaTech  10 месяцев назад +1

      Yes in new videos it's not there. This particular video is v old