Pages

Friday, March 28, 2014

How to Enter a Docker Container without SSH

On of my colleagues here showed me a great trick that I had to document immediately.  The question of the day was "How do I access a container without having SSH installed?"  It turns out, it's easier than you might think.  Let's take a look at the process.

The first thing that you need to do is get the PID (Process ID) of the container that you want to enter.  So, grab the <Container ID> and inspect it.

# docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a711c7ab0420 scott:latest echo hello 31 minutes ago Exit 0 distracted_tesla

# docker inspect --format '{{ .State.Pid }}' a711c7ab0420
2217

Tuesday, March 25, 2014

Python in a container on Fedora, using Docker

In just a few simple steps, you can have an instance of Python up and running in a Docker container. This one was contributed by Aditya Patawari. You can get the latest Dockerfiles here:

https://github.com/scollier/Fedora-Dockerfiles

Tested on Docker 0.7.6 and 0.8.1 and Fedora 20

Get the version of Docker:

# docker version


To build:

Wednesday, March 19, 2014

Docker Registry in a Container on Fedora, Using Docker

In just a few simple steps, you can have an instance of the Docker registry up and running in a Docker container. This one was contributed by Stephen Tweedie. You can get the latest Dockerfiles here:

https://github.com/scollier/Fedora-Dockerfiles

Tested on Docker 0.8.1 and Fedora 20

Get the version of Docker:

# docker version

To build:

# docker build -rm -t username/registry .

To run:

# docker run -d -p 5000:5000 username/registry

Monday, March 3, 2014

Earthquake Twitter Client on Fedora, Using Docker

In just a few simple steps, you can have an instance of the earthquake terminal based twitter client up and running in a Docker container. Maciej was kind enough to contribute this gem - no pun intended. It's actually a really cool project and just one of the many apps that can be dockerized. Check out his webpage here and give him a follow.

This was tested on Docker 0.8.0

Grab the dockerfile from either of these locations:

https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

Sunday, March 2, 2014

New Package fedora-dockerfiles is now Available

Please check out and test fedora-dockerfiles. This package provides a community contributed set of examples that can assist in learning about Docker containers. Use these examples to stand up test environments using the Docker container engine. The following Dockerfiles are included:

Apache
CouchDB
Firefox
Memcached
MongoDB
MySQL
nginx
Nodejs
PostgreSQL
RabbitMQ
SSH
wordpress_single_container