ibuildthecloud/systemd-docker

Host config of container is reset when it starts

marcelk opened this issue · 1 comments

If systemd-docker is used without the "--rm" argument, the host configuration of the container is reset when the container is started for the second time. For example, if the "--privileged" parameter is used, the container will run in privileged mode the first time, but when it is started for the second time, it's not privileged any more. Also, the port bindings are gone, and all other HostConfig properties.

This is caused by this line in lookupNamedContainer:

err = client.StartContainer(container.ID, nil)

The second parameter, which is the host configuration, is left blank. I'll submit a pull request with a fix.

I create v0.2.0 that includes this fix.