Closed ShagoY closed 5 years ago
Of course! Sincerely I have ever used any "aditional option", and I never would have thought it.
Thank you!
Would you like to make the pull request?
docker-compose.yml :
version: '3.2'
services:
ntopng:
image: junquera/ntopng
container_name: ntopng
restart: unless-stopped
network_mode: host
volumes:
- ./ntopng.conf:/ntop/ntopng.conf:ro
environment:
- CONFIG=/ntop/ntopng.conf
Or
docker run --net=host -t -p 3000:3000 -e CONFIG=/ntop/ntopng.conf -v ./ntopng.conf:/ntop/ntopng.conf:ro junquera/ntopng
Hi @ShagoY! I don't really understand what have you done, there are a lot of changes (some in the issue and some others in the pull request), but I've detected that you have worked based in an old commit. Please, pull the latest master changes and integrate your changes there. Then pull request again.
Personally I prefer this way in your issue comments:
# start.sh
cd /ntop/ntopng && ./ntopng "$@"
than this other in your PR:
cd /ntop/ntopng && ./ntopng $CONFIG
If you have any doubt or you prefer me to do it, feel free of tell me, but I would like to see this commits with your name: it's your work and your idea!
I don't know why I was on an old commit.... btw i made the Pull request again and it's ok with docker cloud.
"$@" uses the tag "cmd" (cmd line and docker-compose) but if you do a "ps aux", you will notice that the cmd is also added to start.sh script.
However, if you use the environment variables ($CONFIG), they are only added to ./ntopng
So it's a design choice, I guess....
Perfect! Do you wanna add the docker-compose
file to the PR or is it ok?
I have no opinion on that.
I think adding the possibility to use this variable directly in the "readme" may be enough.
In addition, the variable can be used in different ways:
docker run --net=host -e CONFIG=/ntop/ntopng.conf -v./ntopng.conf:/ntop/ntopng.conf:/ntop/ntopng.conf:ro junquera/ntopng
Or
docker run --net=host -e CONFIG="-i=eth1 -w=3000 -n=1" junquera/ntopng
I'll add it then with the two links you told. I think it could be usefull for many people.
Tonight (in Spain, in about five hours) I merge your code! :wink:
Excellent! I am a neighbour from France ;-)
Done! Thank you very much! Merci! :smile:
Hi @junquera :)
First of all, thank you for this ntopng docker version!
I would like to add the file ntopng.conf "out of the box" without making any modifications (build, etc...), is it possible?
Regards.