schweikert / fping

High performance ping tool
https://fping.org
Other
1.03k stars 251 forks source link

Dockerfile for fping #224

Closed darless closed 1 year ago

darless commented 3 years ago

This adds a Dockerfile to the repository. The start of this is to build on the latest ubuntu (20.04).

I could see this being useful to test out new changes that require different versions of packages without affecting the host system. This is also useful if/when CI is modified to use Github Actions #223 as the dockerfile could automatically get pushed to the latest on a push to master.

Build:

docker build -t fping -f contrib/Dockerfile .

Run fping on a host that does not have fping currently

$ docker run -it fping 4.2.2.2 8.8.8.8 1.2.3.4
4.2.2.2 is alive
8.8.8.8 is alive
1.2.3.4 is unreachable

Run fping within container

docker run --entrypoint bash -it fping
root@8ca8ee184d27:/app# fping 4.2.2.2 1.2.3.4 -t 30
4.2.2.2 is alive
1.2.3.4 is unreachable
schweikert commented 2 years ago

Thank you, I am willing to merge this, but could you move it under "contrib"?

darless commented 1 year ago

This has been done and updated original comment about how to build with Dockerfile in the contrib folder.

darless commented 1 year ago

@schweikert what else is needed for PR to be merged?

schweikert commented 1 year ago

I still see a file named Dockerfile outside of the contrib directory.

darless commented 1 year ago

You are correct, my apologies, should be corrected now. I left .dockerignore in the main directory, to allow building appropriately. If that's not accepted I can figure out how best to change the building of the docker container.

schweikert commented 1 year ago

Thanks!