-
Notifications
You must be signed in to change notification settings - Fork 16
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
Create Dockerfile #18
base: master
Are you sure you want to change the base?
Conversation
Sorry, I'm reluctant to add something to the code base I'm personally not ready to maintain. |
Can I do anything to enable you to maintain it? |
I guess such docker files are something more personal than generic. I don't think they belong to the repository. Also "prepare_externals" scripts are there to help me during development, they are not part of official build process. I would recommend using cc.cmake instead to build any project from the CommsChampion Ecosystem, it will automatically bring all the dependencies that you need. |
A lot of projects provide a official
I will have a look at this. |
I updated the Dockerfile to use cc_cmake. You can build it using
I don't know if it is possible, but if you could publish the binaries from github actions, I could just download them into a ubuntu docker image. |
While I understand your reasoning and see the appeal, I'm still reluctant to make it a part of this repository. Here is why:
With all said above I can envision possible future docker support as a separate project, say cc.docker, which will provide and manage Dockerfiles for various possible "solutions". It can chase after and accumulate the releases of other CommsChampion Ecosystem projects and have it's own releases, similar to the cc.cmake. It can also have multiple scripts to upload the configurations to the docker hub manually or via github actions if needed. When it's in a separate project I can have someone else with more docker knowledge and experience to maintain and look after it. If it's going to be under the umbrella of the commschamp organization, then it's still going to be "official" rather than third party builds. As a side note, I see you enforce build with C++20 standard, while the "official" default build is C++17, (C++20 and C++23 builds are supported just for the source code quality and easy possible future upgrade). Why such enforcing should be in the "official" docker file for the gateway application? You see, there are lots of nuances that you try to enforce on others by creating a single "official" Dockerfile. What about the client applications of pub/sub? Are there any docker files for them? It can get cluttered very fast. |
Hi, However the example mqttsn gateway still works better than than the only other maintained mqttsn-gateway I found (https://github.com/eclipse/paho.mqtt-sn.embedded-c) and it would be a shame if it is not used / disappears into oblivion.
The usage is not forced, I just copy the default config, so that at least a config is available and the gateway starts out of the box. It's pretty easy to change:
or mount it somewhere else and pass
Yes, that's my mistake, somehow I thought the docs say c++20. I am gonna fix this.
I am not exactly sure what you mean, I think the docker image contains the program built with the recommended build settings. Since one docker image should only contain one service, there is no side-effect to other programs.
I took a look at the official mosquitto broker image, and noticed that they include the client programs like
That seems like an interesting architecture, but I would be more than fine with it. |
To the best of my very shallow understanding of the docker ecosystem is that you can create a bootable image which you start and get a console within it, or specify command to be executed right away. I wasn't aware of the ability to change the arguments to the command. Is there a way to specify a full custom command line in the docker invocation arguments to be executed when image is up? If yes, then maybe a full "CommsChampion Ecosystem" (just the apps without the "tools" related projects) should be provided as a docker image and the user can invoke that image with any command he/she likes. Anyway if you're up to it, maybe you can create such a project in your personal space (use the cc.cmake as a repo for all your possible builds) with proper README of how to use it. If we're both happy with how it looks like and works, then maybe we can move it to the the commschamp organization and you'll be assigned as a main developer there. |
There are two ways to set the start command from a Dockerfile. They both play hand in hand and you can also override both in
To run docker run -it --rm debian:bookworm-slim ls -l or set the entrypoint to docker run -it --entrypoint=ls debian:bookworm-slim -l As you can see, I can pass
Yes: docker run -it --rm comms-champion cc-mqttsn-gateway -c <path> docker run -it --rm comms-champion cc-app-foo -xyz |
I thought about this and reread
IMO all apps should get their own container, to keep image size small. Nethertheless we could start like this and see how big the image gets. What apps would like to see in the image? |
For starters I suggest creating two different containers "apps" and "tools". Please use "develop" branch of the cc.cmake project for now. Apps Container
Tools Container
|
No description provided.