Productive with Docker in 20 minutes

Click for: original source

George Fogle article about how to find a better, more productive development workflow with Docker. Docker and container-based development is really going to save you time in the future. As well as make working and debugging code a breeze.

A container is acting like an entirely separate computer, even though it’s on your computer. So using the name localhost inside of a container is not the same as using localhost in code that is running on your computer.

The article then explain how to use:

  • Docker
  • Docker Compose
  • Dockerfile
  • Image
  • Containers
  • Debugging effectively

When we’re creating an image, we first create a script file that will run some commands that Docker recognizes called a Dockerfile. The output of these commands create an image, that we’ll start container processes based off of.

Article also describe usage of environment variables with the environments keyword in docker-compose.yml.

Author also mentions how we can be more effective at debugging by using breakpoints that attach to the node process in our container. We an expose a port, where we can attach and set breakpoints from inside IDE. Interesting, give it a go!

[Read More]

Tags containers aws docker