-
Notifications
You must be signed in to change notification settings - Fork 24
Dockerfile for backend #1225
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
Dockerfile for backend #1225
Conversation
- reduce the size of the docker image created - add entrypoint script to select what to launch
|
With this we have two docker images with |
Can |
not exactly, we need to add I don't think this is a problem if the end goal is to have one image to run all Zonemaster programs, like: |
We can do it by reusing the same container : or using another container, but in this case the container must use the If we want, we can add "zmb" and "zmtest" to the zonemaster_launch script to be able to run it, like this: |
Yes, but that is close enough to me. I should have clarified that in my question. |
I think that we should still keep the zonemaster-cli docker image for those that just want to run that. The extra argument for CLI when using the "full" image is not a problem, I think. |
|
I think the following alternative looks fine. It is just a matter of documentation.
|
As I understand it, you can choose another ports, but what do the two "5000" mean? Some port translation?
If you choose another port for RPCAPI, e.g. 6000, can you specify that to |
Just running |
I had no issues with IPv6. It works for both CLI and Backend via zmtest/zmb. I tested on a Ubuntu VPS where I have enabled IPv6 support for Docker. See instructions in https://github.com/zonemaster/zonemaster/blob/569501e0afa34de739ce3fb7c2ccd1a7d6f39161/docs/internal/maintenance/ReleaseProcess-create-docker-image.md#enable-ipv6-support |
|
I had an issue with piping the output of an Would it be possible to have the |
matsduf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some rough edges, but this can be merged as far as I can see. The "how to test should be updated" too.
I assume that documentation is added in various documents in documentation tree.
Yes You can change the port, for example |
Thanks, I've edited it. |
Thanks for the tips, I can't find a way to remove it directly from the docker output, I'll keep looking for it. |
If it cannot be removed we should add that to the documentation. It might not be needed under Windows. |
Co-authored-by: tgreenx <[email protected]>
|
Will we get some documentation under https://github.com/zonemaster/zonemaster/tree/master/docs/public/using/backend? It would be good with some cross references between that new document and https://github.com/zonemaster/zonemaster/blob/master/docs/public/using/cli.md |
|
Successfully tested this PR for release 2025.2. |
Purpose
This PR propose a Dockerfile for backend.
It capable to launch 'rpcapi' or 'testagent' or both from docker run argument.
'zmb' and 'zmtest' are also available from docker run argument.
It is also capable to launch zonemaster-cli, it is needed for building an All In On docker image able to launch both CLI or GUI.
This docker image use S6 Overlay to manage multiple process running at the same time in docker.
It's possible to launch only 'rpcapi' or 'testagent' alone. It's for future use, and is not useful at the moment.
Usage
For testing zonemaster-cli
All argument after 'cli' are forwarded to 'zonemaster-cli'
For testing zonemaster backend
Container can be stopped with
docker stop zmYou can interact with the backend with 'zmb' or 'zmtest' from the host if they are installed. Otherwise, you can use them from within Docker itself.
Note: The "--net host" option is required, otherwise the container cannot access the backend on port 5000.
Context
Proposition for #953
Changes
How to test this PR
To be able to test this PR, you need to build zonemaster-cli docker image first.
You must be able to build 'zonemaster/backend:local' image by executing
Testing zonemaster-cli
You must be able to test zonemaster-cli with
docker run -ti --rm zonemaster/backend:local cli [options]. Every option must be passed to zonemaster-cli without exception.Testing backend
launch the backend with the following cmd:
You must be able to test some domain using
zmbfrom the host.To stop the backend run: