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

Running Docker image missing --name flag #133

Open
GeorgelPreput opened this issue Feb 21, 2023 · 7 comments
Open

Running Docker image missing --name flag #133

GeorgelPreput opened this issue Feb 21, 2023 · 7 comments

Comments

@GeorgelPreput
Copy link

When deploying and running the Docker image, the application fails and complains about not being given the --name parameter, as in the screenshot below. The Dockerfile indeed runs the application without that parameter:

ENTRYPOINT ["./openbooks", "server", "--dir", "/books", "--port", "80"]

In certain scenarios, such as cloud deployment directly from Docker Hub, it becomes rather convoluted to change this. Two suggestions for mitigation would be:

In the main app:

  • Either also read the name from the environment variables and only throw an error if the env var has also not been set
  • Or provide a default for the --name flag (such as "openbooks", or even generate one on the fly)

Thanks!

image

@Kr1sDarnok
Copy link

Same issue here, never happened before though

@alfdav
Copy link

alfdav commented Mar 2, 2023

add the flag --name and invent any name and it will connect. Something like this:docker run -p 8080:80 evanbuss/openbooks --name randomcoolnickname

However, as of today I can't figure out what's blocking the connection and preventing the search function to work. I believe it has to do with the TLS or something of sorts.

@frollard
Copy link

Same - using unraid can't push a post-argument, only port path variable label or device...none of which are picked up by the container.

@Unrepentant-Atheist
Copy link

I got the same problem, docker run -p 8080:80 evanbuss/openbooks --name randomcoolnickname doesn't help.

@canedje
Copy link

canedje commented Dec 24, 2023

same here
image
didn't help

@canedje
Copy link

canedje commented Dec 24, 2023

I did find the answer for unraid:

You need to add:
image
At Post arguments in advanced mode

@etuck
Copy link

etuck commented Jan 3, 2024

And if anyone is using a Docker Compose file the fix is to add a "command" attribute.

version: "3"
services:
  openbooks:
    container_name: openbooks
    image: evanbuss/openbooks:latest
    environment:
      TZ: America/New_York
    ports:
      - 8071:80
    volumes:
      - /path/to/openbooks:/books    
    command: --name CoolName --persist

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

7 participants