Document how to debug Garage distroless container #871
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#871
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, I'm new to garage, and i set it as a docker container, because i run it on a limited server where i can't directly run binaries
Version: dxflrs/garage:v1.0.0
I want to login to the docker container, so i run docker exec -it garage /bin/sh but I get
OCI runtime exec failed: exec failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown
Is it possible to have the shell in one of the next docker images, so it would be possible to use the CLI interface when needed for maintenance?
Thanks
Garage container is, on purpose, a "distroless" container. We see the following advantages to this technical choice:
To debug a distroless container, you can:
docker debug
if you pay for the enterprise/pro plan.An example on how to attach a debugging container to your garage instance:
Then you can explore your container filesystem by doing:
You can get more explanations and examples by reading Docker: How To Debug Distroless And Slim Containers.
You can also build your own distro-based container by fetching Garage static binary on your own image:
Or you can directly extract the binary from our docker image:
These instructions could be added to Garage's documentation.
Docker image doesn't have the shellto Document how to debug Garage distroless containerThanks for the explanation, I am not expert, and I didn't realize I could do that. Tried solutions 3 and 4 and both are working fine. Meanwhile, yesterday I made a python script to add/create/delete layouts/users/buckets via the admin api and once I understood how everything works, it's now easy to use
Your decision definitely makes sense, and effectively it's a bad habit to have full distros in containers
I wonder if is it also possible to run the garage command via
docker exec
command? If it's possible, what's the path? I trieddocker exec garage-1 garage --help
but it says"garage": executable file not found in $PATH
Try with
docker exec garage-1 /garage --help
, you need to use the absolute path