amir20 / dozzle

Realtime log viewer for docker containers.
https://dozzle.dev/
MIT License
5.7k stars 287 forks source link

Open a bash terminal into the dozzle docker container #3125

Closed drmrbrewer closed 1 month ago

drmrbrewer commented 1 month ago

Describe the feature you would like to see

With any other docker container I deploy on my system, I am able to open a bash terminal into the container (say 931a1a4454b8) with:

docker exec -it 931a1a4454b8 bash

Or if not bash then at least sh instead.

But with the dozzle container I can't... I just get:

OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown

In fact it's not just bash that doesn't work, but sh or ls or pwd or indeed any command other than /dozzle.

I've tried setting PATH in case that's the issue... but no help.

Maybe I'm showing my lack of docker knowledge, but how can do this? Ultimately my aim is to deploy dozzle via a Dockerfile starting with FROM amir20/dozzle:latest... and then some additional customisations... this works with my other docker stuff, but in this case I get errors when trying to run any command starting from amir20/dozzle.

amir20 commented 1 month ago

Dozzle uses minimal image which is scratch. https://stackoverflow.com/questions/47373889/what-is-dockers-scratch-image It doesn't ship with any linux distribution like alpine, debian, or etc... This is both for performance reasons and security reasons.

Maybe I'm showing my lack of docker knowledge

Yes, probably. You can use multi stage build with Docker and use something like alpine. But how to do that is beyond the scope of an issue for Dozzle. I think Stackoverflow.com would be better.

and then some additional customisations

I wonder what are those customizations?

I am closing this because there isn't anything to do.