mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-17 01:05:26 +00:00
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:
@@ -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:
|
||||
|
||||
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user