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

Docker file issue due to env variable #97

Closed
channel960608 opened this issue Sep 18, 2024 · 2 comments
Closed

Docker file issue due to env variable #97

channel960608 opened this issue Sep 18, 2024 · 2 comments

Comments

@channel960608
Copy link

When I clone the project and try to build and run the docker image, i got this issue:

# docker run -it --rm etcdkeeper:dev
invalid value "$PORT" for flag -p: parse error
Usage of ./etcdkeeper.bin:
  -auth
        use auth
  -cacert string
        verify certificates of TLS-enabled secure servers using this CA bundle (v3)
  -cert string
        identify secure client using this TLS certificate file (v3)
  -h string
        host name or ip address (default "0.0.0.0")
  -key string
        identify secure client using this TLS key file (v3)
  -p int
        port (default 8080)
  -sendMsgSize int
        ETCD client max send msg size (default 2097152)
  -sep string
        separator (default "/")
  -skiptls
        skip verify tls
  -timeout int
        ETCD client connect timeout (default 5)
  -usetls
        use tls

It seems that the 2 variables in the Dockerfile are empty, $HOST and $PORT. The bin file can't parse the arguments correctly when it executes.
ENTRYPOINT ["./etcdkeeper.bin", "-h", "$HOST", "-p", "$PORT"]

Besides, since we are using ENTRYPOINT in Dockerfile, we are not able to overwrite the argumnets since we have built the docker image.

@channel960608
Copy link
Author

channel960608 commented Sep 18, 2024

#98
I have created a pr here to fix this issue.

@evildecay
Copy link
Owner

The Docker configuration changes were also recently submitted by other contributors. I haven't had time to test them yet. Thank you for your contribution.

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

2 participants