Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: one or more required arguments were not provided #96

Open
ansible42 opened this issue Jan 13, 2025 · 6 comments
Open

error: one or more required arguments were not provided #96

ansible42 opened this issue Jan 13, 2025 · 6 comments

Comments

@ansible42
Copy link

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

@w4
Copy link
Owner

w4 commented Jan 13, 2025

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

@zQueal
Copy link
Contributor

zQueal commented Mar 12, 2025

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.

@w4
Copy link
Owner

w4 commented Mar 12, 2025

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

@paberr
Copy link

paberr commented Mar 14, 2025

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.

@stappersg
Copy link
Contributor

stappersg commented Mar 14, 2025 via email

@zQueal
Copy link
Contributor

zQueal commented Mar 14, 2025

I ended up going with this;

Note

My VPS is IPv4 only, with a caddy2 reverse_proxy running 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants