Improve usability for garage in container by setting entrypoint (#1363)

- BREAKING: This update will probably break previous containers setups
that expect you to provide `/garage`

After the upgrade, instead of:
    docker run --rm dxflrs/garage:latest /garage --help
you need to run
    docker run --rm dxflrs/garage:latest --help

Signed-off-by: ieugen <eugen@ieugen.ro>

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1363
Reviewed-by: Alex <lx@deuxfleurs.fr>
Co-authored-by: ieugen <eugen@ieugen.ro>
Co-committed-by: ieugen <eugen@ieugen.ro>
This commit is contained in:
ieugen
2026-02-27 18:12:42 +00:00
committed by Alex Auvolat
parent 2bde733e09
commit b070b67be5
3 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -4,4 +4,6 @@ ENV RUST_BACKTRACE=1
ENV RUST_LOG=garage=info
COPY result/bin/garage /
CMD [ "/garage", "server"]
ENTRYPOINT ["/garage"]
CMD ["server"]
+5
View File
@@ -213,7 +213,12 @@ If your configuration file is at `/etc/garage.toml`, the `garage` binary should
You can also use an alias as follows to use the Garage binary inside your docker container:
```bash
# garage 3.x, we have an entrypoint and you can use
alias garage="docker exec -ti <container name>"
# For garage 2.x, you need to specify the absolute path to binary
alias garage="docker exec -ti <container name> /garage"
```
You can test your `garage` CLI utility by running a simple command such as:
+5 -2
View File
@@ -178,8 +178,11 @@ garage status
If you are running Garage in a Docker container, you can use the following command instead:
NOTE: Garage 3.x uses docker `ENTRYPOINT` and it's easier to use,
while garage 2.x does not and you need to specify path `/garage`
```bash
docker exec garage-container /garage status
docker exec garage-container status
```
This should show something like this:
@@ -320,7 +323,7 @@ If you are running Garage in a Docker container, you can set the following alias
to provide a fake `garage`command that uses the Garage binary inside your container:
```bash
alias garage="docker exec -ti <container name> /garage"
alias garage="docker exec -ti <container name>"
```
You can test that your `garage` CLI is configured correctly by running a basic command such as `garage status`.