diff --git a/index.html b/index.html index 766e606..58d64ae 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ - + @@ -129,9 +129,9 @@ - - - + + +
@@ -139,7 +139,7 @@

So you're building a Docker image. What might be wrong with it?

- +

You learned about Docker. It's awesome and you're excited. You go and create a Dockerfile:

@@ -157,7 +157,7 @@ CMD ["/my_app/start.sh"]

Not quite. You have Ubuntu installed in Docker. The files are there. But that doesn't mean Ubuntu's running as it should.

When your Docker container starts, only the CMD command is run. The only processes that will be running inside the container is the CMD command, and all processes that it spawns. That's why all kinds of important system services are not run automatically – you have to run them yourself.

Furthermore, Ubuntu is not designed to be run inside Docker. Its init system, Upstart, assumes that it's running on either real hardware or virtualized hardware, but not inside a Docker container, which is a locked down environment with e.g. no direct access to many kernel resources. Normally, that's okay: inside a container you don't want to run Upstart anyway. You don't want a full system, you want a minimal system. But configuring that minimal system for use within a container has many strange corner cases that are hard to get right if you are not intimately familiar with the Unix system model. This can cause a lot of strange problems.

- +

"What important system services am I missing?"

A correct init process
@@ -298,7 +298,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

The shell script must be called run, must be executable, and is to be placed in the directory /etc/service/<NAME>.

-

Here's an example showing you how a memached server runit entry can be made.

+

Here's an example showing you how a memcached server runit entry can be made.

### In memcached.sh (make sure this file is chmod +x):
 #!/bin/sh
@@ -350,7 +350,7 @@ ADD memcached.sh /etc/service/memcached/run
- + @@ -359,7 +359,7 @@ ADD memcached.sh /etc/service/memcached/run

BROUGHT TO YOU BY PHUSION

- +