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

Run clock-bound-d on Docker #8

Open
ohkinozomu opened this issue Mar 21, 2022 · 3 comments
Open

Run clock-bound-d on Docker #8

ohkinozomu opened this issue Mar 21, 2022 · 3 comments

Comments

@ohkinozomu
Copy link

ohkinozomu commented Mar 21, 2022

Hello.
I would like to run clock-bound-d on Docker, but there are probably two barriers.

  1. clock-bound-d currently supports only syslog logging.

I wrote the following Dockerfile, but this gives me an error.

FROM rust:1.59.0-bullseye
RUN cargo install clock-bound-d --version 0.1.1
CMD ["clockboundd"]
thread 'main' panicked at 'could not connect to syslog: Error(Initialization, State { next_error: Some(Error(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), State { next_error: None, backtrace: InternalBacktrace })), backtrace: InternalBacktrace })', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/clock-bound-d-0.1.1/src/main.rs:65:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  1. clock-bound-d supports only 323 port.

When running clock-bound-d on Docker, I'm thinking of running chrony as a side car.
For example, I'm thinking of using https://github.com/cturra/docker-ntp , which works with port 123.
I think a workaround is possible, but it would be useful to be able to use a port other than 323.

Are there any plans to make these two points configurable?

@basilnsindhu
Copy link
Contributor

Hi,

Can work on adding the configuration option for the port, should be simple enough. As for the syslog, I don't see why syslog won't be working on the docker. Would you be able to verify if syslog is installed and running on your Docker?

@ohkinozomu
Copy link
Author

ohkinozomu commented Mar 30, 2022

Can work on adding the configuration option for the port, should be simple enough.

I'll work on it (I'm not familiar with Rust, so it will take some time).

Would you be able to verify if syslog is installed and running on your Docker?

Syslog is not installed and not running in my Docker image.
It may be possible to run syslog in Docker by some hacky way ( https://stackoverflow.com/questions/47973554/how-to-let-syslog-workable-in-docker ), but I don't think it is the Docker way.
STDOUT/STDERR should be used.
If for some reason clock-bound-d relies on syslog, it should be clearly stated that it doesn't support Docker.

@basilnsindhu
Copy link
Contributor

Open to patches to add support for stdout/stderr, theres no hard dependency on syslog.

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