6

I'd like to Dockerize our Node.js webapp at work, though I've never worked with any form of containerization software. Has anyone got any good resources for learning it? Should I also be learning Kubernetes?

Comments
  • 1
  • 1
    @ajit555 That's a very nice and SO way to put it :) Because _of course_ I haven't Googled, researched and tried it. I mean, why would I?
  • 1
    Katacoda has some free docker courses: https://katacoda.com/courses/...

    No installations needed, so it's a quick and easy way to start playing around with docker.
  • 1
    @thoxx I'll check it out. Thanks :)
  • 1
    I would suggest you first start with downloading some docker images of complete applications like MySQL image, Ubuntu image, etc etc... Just to get the feel on how given a project like your nodejs webapp could be easily deployed anywhere given just a Dockerfile (the YAML formatted config/instructions on how to setup the docker container)

    Once you do that, start small, there's a YouTube video about Docker in 12 or 15 minutes I don't exactly remember but he talks about how to take a php code and dockerize that, very simple to follow, then you can repeat what he did for your nodejs app, once you get it running the first time DONT PUSH TO PROD, read on best security practices on using environment variables and all that.

    Then, lookup docker-compose, play around with it, try to write your whole stack in it, but don't use it, just understand how you can connect the dots (different applications) together so you can with one command run the whole application, (end of part 1)
  • 1
    (continued) while on your journey also search for methods on how to keep data consistent, as containers tend to lose their state when they go off.

    Once you do all that, then look up kubernetes, you'll soon realize it's exactly the same as docker-compose, just that it allows you to remotely deploy and manage the whole orchestration of docker images, because docker is a little problematic with remote host (you're gonna soon realize how useful remote controling docker images is, and how necessary that is), kubernetes fixes that, but just know it has a little steep learning curve as there is these pods, nodes, local dns, local configs, too. Much. Stuff. To learn....

    Good luck!! I hope what I said gives you an idea on how the world of dockerizing and orchestration could look like...
  • 0
    @Revenger Hey thanks :) So Docker Swarm ain't good?
  • 1
    @ScriptCoded I read once on their GitHub issues that they didn't want to implement native remote host switcher or something like that which would eventually allow me to access docker daemon instance on another server instead of always the local one, I did take a look at docker swarm, but seemed to be a bit too unopen which could eventually result in future problems for me at where I work, luckily we had a course about all that kind of stuff from developing nodejs app to testing to dockerizing to prod, and there the lecturer showed that the best practice is docker and kubernetes as that would eventually allow you to copy paste your infrastructure to any cloud you want. Amazon using Kops (don't use EKS, it's just another money grabbing service), Google cloud natively, or bare metal if you're that crazy
  • 0
    @Revenger Okay, then I'll eventually look into Kubernetes I guess. Thanks again 😊
Add Comment