Docker init version missing

Hi all,

I’ve encountered an issue trying to run my containers with the --init flag, it runs fine normally without the flag, however I need the flag to listen to SIGTERM signals within my application inside the container.

I’ve installed docker following this guide: http://blog.sdmoko.net/installation-docker-ce-on-openSUSE-Leap-42-3.html

Running containers with the --init flag causes


docker: Error response from daemon: exec: "docker-init": executable file not found in $PATH.

The output from docker info I get is:


Containers: 22                                                                              
 Running: 0
 Paused: 0
 Stopped: 22
Images: 298
Server Version: 17.09.1-ce
Storage Driver: btrfs
 Build Version: Btrfs v4.5.3+20160729
 Library Version: 101
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: oci runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: N/A (expected: )
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.76-1-default
Operating System: openSUSE Leap 42.3
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.63GiB
Name: linux-fner
ID: SFB3:DMCE:NFY5:BOMU:IFVZ:OAVD:ZHGZ:FWKZ:2GSX:QKKY:XXCJ:MJ7B
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false


WARNING: No swap limit support
WARNING: No kernel memory limit support

I’ve noticed that init version is missing in the docker info output, do I need to install docker CE in a specific way for this to work?

Thanks for your help!

Don’t know how this post escaped my attention, but it’s not to be followed.
Be wary using any reference that’s not an SDB.
Also, most docker related Forum posts will found in the Virtualization forum, not here in the Applications forum.

Installing docker from the virtualization repo is unnecessary today. If a version is old, then I recommend submitting a request to the openSUSE bugzilla to update.
Installing docker from the OSS repo results in the installation of the same version docker (as of today, 17…09.1-ce) so there is no benefit.
Although SUSE/openSUSE is no longer listed in the official docker documentation, if you feel more comfortable you can follow an “improved” documentation I created awhile back for an older version of docker but is probably still completely usable

https://github.com/putztzu/docker/blob/master/docs/installation/linux/SUSE.md

The openSUSE procedure for installing docker is pretty ordinary…
Although there isn’t a pattern, you only need to install “docker” plus any optional packages, so for instance you can run the following (I separate the optional packages by multiple spaces so you can see the difference)

zypper in docker     docker-compose yast2-docker

Although I don’t usually use the “–init” parameter, you can run the following to verify it exists(It’s a “docker run” option). If you have difficulties, post the command you’re trying to run.

docker run --help | grep init

Since there is no difference between docker from the Virtualization repo, it’s up to you whether you continue to use docker as it’s currently installed in your machine or remove the virtualization repo followed by a “zypper up” …
If you switch to docker from the OSS, I recommend you do so earlier than later.

HTH,
TSU

Hello, I have the same problem. It’s a bug in the binary I think. This guy here explains it very well: https://github.com/mviereck/x11docker/issues/23