error: one or more required arguments were not provided
I keep getting required args not provided errors. Even if I am missing something simple it would be nice if the log gave a bit more info.
rgit:
container_name: rgit
image: ghcr.io/w4/rgit:main
restart: unless-stopped
user: ${PUID}
environment:
- REFRESH_INTERVAL=5m
volumes:
- ${GIT}:/git
ports:
- 3333:8000
The issue stems from the Dockerfile no longer calling into the entrypoint.sh, so the binary is expecting "[::]:8000" /git -d /tmp/rgit-cache.db to be passed in as arguments. Ideally the Dockerfile should be fixed though
I've been trying for the better part of an hour now, and it's not possible given the information in the readme to get this working in docker.
I've tried doas docker run --mount type=bind,source=/git,target=/git --user 1000:1000 -it ghcr.io/w4/rgit:main which returns error: one or more required arguments were not provided. I've tried using Portainer in a stack;
version: '3'
services:
rgit:
image: ghcr.io/w4/rgit:main
volumes:
- /path/to/my-repos:/git
ports:
- 3333:8000
restart: unless-stopped
and get error: one or more required arguments were not provided in the docker log. It simply doesn't work.
If you pass --help it should give you more information about the command. I don’t use Docker myself but I’d assume you need an args key with "[::]:8000" /git -d /tmp/rgit-cache.db
It is possible to add the necessary arguments in the docker compose file via the command setting:
version: '3'
services:
rgit:
image: ghcr.io/w4/rgit:main
command:
- "[::]:8000"
- /git
- -d /tmp/rgit-cache.db
volumes:
- /volume/git:/git
ports:
- 8000:8000
environment:
- REFRESH_INTERVAL=5m
restart: unless-stopped
Alternatively, it is also feasible to replace the entrypoint with the entrypoint setting if you prefer.
See also #103
I ended up going with this;
[!NOTE] My VPS is IPv4 only, with a caddy2
reverse_proxyrunning in front.
version: '3'
services:
rgit:
image: ghcr.io/w4/rgit:main
command:
- "0.0.0.0:8000"
- /git
- -d /tmp/rgit-cache.db
volumes:
- /git:/git
expose:
- 8000
environment:
- REFRESH_INTERVAL=5m
restart: unless-stopped
Caddyfile:
*domain.dev {
encode zstd gzip
@git host git.domain.dev
handle @git {
reverse_proxy {rgit_hash}:8000
}
@ping host ping.domain.dev
handle @ping {
respond "pong!"
}
}
Using the caddy reverse_proxy ensures that it's not necessary to expose the ports of the container to the world (and its irresponsible to do). But this works perfectly fine.
Created PR to reflect the changes.