Docker: Difference between revisions
From charlesreid1
| Line 26: | Line 26: | ||
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. | 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. | ||
Nothing working. No idea. Frustrating as hell. | |||
=References= | =References= | ||
Revision as of 22:56, 19 April 2017
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.
april 19 debugging
Cannot reach container, no netstat in the container to check if sockets are open.
Troubleshooting: here and here are both useful pages.
To run netstat in the container, even if netstat is not available in the container, run
$ sudo nsenter -t `docker inspect -f '{{.State.Pid}}'` -n netstat
Can also use docker port command to check which ports are open and exposed to the host:
$ docker port container_name
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.
Nothing working. No idea. Frustrating as hell.
References
Docker's documentation is excellent: https://docs.docker.com/
Docker command line: https://docs.docker.com/engine/reference/commandline/cli/#environment-variables
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
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
How secure are docker containers, really? https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/
| docker notes on the virtual microservice container platform
Installing the docker platform: Docker/Installing Docker Hello World: Docker/Hello World
Creating Docker Containers: Getting docker containers from docker hub: Docker/Dockerhub Creating docker containers with dockerfiles: Docker/Dockerfiles Managing Dockerfiles using git: Docker/Dockerfiles/Git Setting up Python virtualenv in container: Docker/Virtualenv
Running docker containers: Docker/Basics Dealing with volumes in Docker images: Docker/Volumes Removing Docker images: Docker/Removing Images Rsync Docker Container: Docker/Rsync
Networking with Docker Containers:
|
| docker pods pods are groups of docker containers that travel together
Docker pods are collections of Docker containers that are intended to run in concert for various applications.
Wireless Sensor Data Acquisition Pod The wireless sensor data acquisition pod deploys containers This pod uses the following technologies: Stunnel · Rsync · Apache · MongoDB · Python · Jupyter (numerical Python stack)
Deep Learning Pod This pod utilizes the following technologies: Python · Sklearn · Jupyter (numerical Python stack) · Keras · TensorFlow
|