From charlesreid1

No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
It's like [[Homebrew]] or [[Aptitude]] for apps.
It's like [[Homebrew]] or [[Aptitude]] for apps.


=april 19 debugging=
[[Docker/Troubleshooting]]


Cannot reach container, no netstat in the container to check if sockets are open.
[[Docker/Network Debugging]]
 
Troubleshooting: [http://stackoverflow.com/questions/27806631/docker-rails-app-fails-to-be-served-curl-56-recv-failure-connection-reset here] and [http://stackoverflow.com/questions/40350456/docker-any-way-to-list-open-sockets-inside-a-running-docker-container here] are both useful pages.
 
To run netstat in the container, even if netstat is not available in the container, run
 
<pre>
$ sudo nsenter -t `docker inspect -f '{{.State.Pid}}'` -n netstat
</pre>
 
Can also use docker port command to check which ports are open and exposed to the host:
 
<pre>
$ docker port container_name
</pre>
 
Went through some debugging with [[Iptables]] rules, and dropping a bunch of old crusty rules that were not being used/applied. This did not affect the firewall/connection in any way.
 
Now, I'm getting really frustrated. Port 8888 simply will not open up to the outside world. Port 8081 works fine and is open from the container to the outside world (MongoExpress), but has no rules set in the firewall (incoming packets set to accept all). Same thing with port 28017, this port is also open. There is one rule for it, exactly the same as the one rule for port 8888.
 
Changing the port number to 9990 did not affect the outcome either. The container is still unreachable, even from the localhost. No port 9990 open anywhere, when scanning from a remote machine and when scanning from the local machine.
 
<s>Nothing working. No idea. Frustrating as hell.</s>
 
Yes, of course, two minutes later everything just MAGICALLY works somehow, after the fifth time trying the EXACT SAME SET OF COMMANDS.


=References=
=References=
Line 35: Line 11:
Docker's documentation is excellent: https://docs.docker.com/
Docker's documentation is excellent: https://docs.docker.com/


Docker command line: https://docs.docker.com/engine/reference/commandline/cli/#environment-variables
Docker from the command line: https://docs.docker.com/engine/reference/commandline/cli/
 
Docker run: https://docs.docker.com/engine/reference/commandline/run/#full-container-capabilities---privileged


Docker to run memcached (Digital Ocean guide): https://www.digitalocean.com/community/tutorials/docker-explained-how-to-create-docker-containers-running-memcached
Docker to run memcached (Digital Ocean guide): https://www.digitalocean.com/community/tutorials/docker-explained-how-to-create-docker-containers-running-memcached


Note that many Docker issues on Github contain a wealth of useful debugging strategies and commands for checking the state of networks, ports, etc.: https://github.com/docker/docker/issues/13914
Note that many Docker issues on Github contain a wealth of useful debugging strategies and commands for checking the state of networks, ports, etc. Example: https://github.com/docker/docker/issues/13914
 
How secure are docker containers, really? https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/


Potential security issues with Docker containers: https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/


=Flags=


{{DockerFlag}}
{{DockerFlag}}

Latest revision as of 09:40, 28 February 2018

Docker is a way of deploying apps on servers. It packages apps into side-by-side containers. These are similar in spirit to virtual machines, but different because containers are not (or, don't have to be) fully bundled operating systems. The container system makes sure everything runs the same everywhere.

It's like Homebrew or Aptitude for apps.

Docker/Troubleshooting

Docker/Network Debugging

References

Docker's documentation is excellent: https://docs.docker.com/

Docker from the command line: https://docs.docker.com/engine/reference/commandline/cli/

Docker to run memcached (Digital Ocean guide): https://www.digitalocean.com/community/tutorials/docker-explained-how-to-create-docker-containers-running-memcached

Note that many Docker issues on Github contain a wealth of useful debugging strategies and commands for checking the state of networks, ports, etc. Example: https://github.com/docker/docker/issues/13914

Potential security issues with Docker containers: https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/

Flags