Docker: Hello World

docker run hello-world

The installation message details what Docker is doing:

  1. Docker client contacted Docker daemon
  2. Docker daemon pulled the “hello-world” image from the Docker Hub (after checking locally)
  3. The Docker daemon created a new container from that image which runs the executable that produces the installation message output  (i.e. 1 to 4)
  4. Docker daemon streamed the output to the Docker client which sends it to the terminal



Python > parsing JSON


Note: [] are for lists, {} are for dictionaries.

We can parse it with Python like this:


Python: getting rid of the ‘u’ symbol when outputting text

I find it really annoying that whenever Python prints a string it prints out a u when it’s Unicode.

When you copy and paste that stuff it retains it all. If you’re copying and pasting JSON you’re left with broken JSON. Here’s how to get rid of it:


Python > Inspect an object


print dir(<my object>)

where <my object> is your object name.


dirreturns the list of names in the current local scope.


vars returns the __dict__attribute for a module, class or instance.


__dict__ is a dictionary or other mapping object used to store an object’s writable attributes.