dockette / adminer

:whale: Tiniest boxed dockerized Adminer (MySQL, PostgreSQL, SQLite, Mongo, Oracle) Dockerfiles
MIT License
85 stars 29 forks source link

Error: /tini no souch file or directory #39

Closed aqos156 closed 2 years ago

aqos156 commented 2 years ago

After deploying latest docker image of dg variant an error occured in our environment.

OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/tini": stat /tini: no such file or directory: unknown

After further testing it is not limited to the dg variant but also full is not working. Maybe something to do with the absolute path of /tini?

https://github.com/dockette/adminer/blob/c5b6182b090ae038b611d7f3bafd1089162690fa/adminer-dg/Dockerfile#L34

It seems like the binary tini is not even present in the container.

╰─$ docker run \ 
    --rm \
    -it \
    dockette/adminer:dg sh
/srv # ls -l
total 520
-rw-rw-r--    1 root     root         32093 Feb 11 23:57 adminer.css
-rw-rw-r--    1 root     root        475730 Feb 11 23:57 adminer.php
-rw-rw-r--    1 root     root           236 Feb 11 23:57 composer.json
-rw-rw-r--    1 root     root          2117 Feb 11 23:57 index.php
drwxrwxr-x    2 root     root          4096 Mar 30 17:30 plugins
-rw-rw-r--    1 root     root          2094 Feb 11 23:57 readme.md
drwxrwxr-x    3 root     root          4096 Mar 30 17:30 static
/srv # /tini
sh: /tini: not found
/srv # which tini
/srv # apk add tini
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/2) Upgrading php7-mysqli (7.4.16-r0 -> 7.4.22-r0)
(2/2) Installing tini (0.19.0-r0)
Executing busybox-1.33.0-r4.trigger
OK: 51 MiB in 40 packages
/srv # which tini
/sbin/tini
f3l1x commented 2 years ago

Solved, thank you.

aqos156 commented 2 years ago

@f3l1x tested the fix and another thing seems broken. From container log:

[10] [Thu Aug 12 11:31:01 2021] 10.0.17.21:49742 Accepted

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "script" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "QUERY_STRING" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "HTTP_X_FORWARDED_PREFIX" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "HTTPS" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Fatal error:  Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /srv/adminer.php:20

Stack trace:

#0 /srv/adminer.php(169): remove_slashes()

#1 /srv/index.php(77): include('...')


}

  thrown in /srv/adminer.php on line 20

[10] [Thu Aug 12 11:31:01 2021] 10.0.17.21:49742 [500]: GET / - Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /srv/adminer.php:20

Stack trace:

#0 /srv/adminer.php(169): remove_slashes()

#1 /srv/index.php(77): include('...')


}

  thrown in /srv/adminer.php on line 20

[10] [Thu Aug 12 11:31:01 2021] 10.0.17.21:49742 Closing
aqos156 commented 2 years ago

@f3l1x tested the fix and another thing seems broken. From container log:

[10] [Thu Aug 12 11:31:01 2021] 10.0.17.21:49742 Accepted

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "script" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "QUERY_STRING" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "HTTP_X_FORWARDED_PREFIX" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Warning:  Undefined array key "HTTPS" in /srv/adminer.php on line 169

[10] [Thu Aug 12 11:31:01 2021] PHP Fatal error:  Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /srv/adminer.php:20
�
Stack trace:

#0 /srv/adminer.php(169): remove_slashes()

#1 /srv/index.php(77): include('...')
�

}

  thrown in /srv/adminer.php on line 20

[10] [Thu Aug 12 11:31:01 2021] 10.0.17.21:49742 [500]: GET / - Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /srv/adminer.php:20
�
Stack trace:

#0 /srv/adminer.php(169): remove_slashes()

#1 /srv/index.php(77): include('...')
�

}

  thrown in /srv/adminer.php on line 20

[10] [Thu Aug 12 11:31:01 2021] 10.0.17.21:49742 Closing

This is the dg version. Others not tested.

f3l1x commented 2 years ago

Should be fixed in https://github.com/dockette/adminer/pull/40.

Can you verify it @aqos156?

aqos156 commented 2 years ago

@f3l1x I have tested the fix and everything seems to be working again, thank you.