sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.28k forks source link

/sbin/tini not found #17445

Open isaiahfrantz opened 3 years ago

isaiahfrantz commented 3 years ago

any version higher than 3.21.2 fedora/podman

Steps to reproduce:

  1. $ podman pull docker.io/sourcegraph/server:3.23.0
  2. $ podman run --publish 7080:7080 --publish 2633:2633 --rm --volume ~/work/sourcegraph/config:/etc/sourcegraph:Z --volume ~/work/sourcegraph/data:/var/opt/sourcegraph:Z -v ~/.ssh:/etc/sourcegraph/ssh:ro,Z --ulimit nofile=10000:10000 docker.io/sourcegraph/server:3.23.0

Expected behavior:

It should start up the services and allow access to the web interface

Actual behavior:

Error: executable file /sbin/tini not found in $PATH: No such file or directory: OCI not found

The only way Ive gotten the container to start is by overriding the entrypoint so either Im missing something or nobody is able to use higher than 3.21.2 I connected to the container and was not able to locate /sbin/tini on the fs. There is only one thing in /sbin:

$ podman run -it --rm --entrypoint="/bin/bash" docker.io/sourcegraph/server:3.23.0
bash-5.0# ls /sbin/
su-exec
isaiahfrantz commented 3 years ago

just so theres no confusion, I had this behavior on 3.22.0 as well

isaiahfrantz commented 3 years ago

uhh, is anybody able to run higher than 3.21.2 with podman?

❯ podman --version
podman version 2.2.1

Am I insane? If the entrypoint command doesnt exist inside the container (eg /sbin/tini) then the container cant start, right?

v3.24.0 (though this is true for me on all version higher than 3.21.2

❯ podman run -it --rm --entrypoint="/bin/bash" docker.io/sourcegraph/server:3.24.0
bash-5.0# ls -l /sbin/tini 
ls: /sbin/tini: No such file or directory

❯ podman run --publish 7080:7080 --publish 2633:2633 --rm --volume ~/work/sourcegraph/config:/etc/sourcegraph:Z --volume ~/work/sourcegraph/data:/var/opt/sourcegraph:Z -v ~/.ssh:/etc/sourcegraph/ssh:ro,Z --ulimit nofile=10000:10000 docker.io/sourcegraph/server:3.24.0
Error: executable file `/sbin/tini` not found in $PATH: No such file or directory: OCI not found

❯ podman inspect docker.io/sourcegraph/server:3.24.0
...
        "Config": {
            ....
            "Entrypoint": [
                "/sbin/tini",
                "--",
                "/usr/local/bin/server"
            ],

v 3.21.2 has /sbin/tini in the image and works

❯ podman run -it --rm --entrypoint="/bin/bash" docker.io/sourcegraph/server:3.21.2
bash-5.0# ls -l /sbin/tini 
-rwxr-xr-x    1 root     root         27488 Apr 20  2020 /sbin/tini
bash-5.0# exit

❯ podman inspect docker.io/sourcegraph/server:3.21.2
...
        "Config": {
            ...
            "Entrypoint": [
                "/sbin/tini",
                "--",
                "/usr/local/bin/server"
            ],