tohojo / flent

The FLExible Network Tester.
https://flent.org
Other
431 stars 77 forks source link

Flent in Docker? #220

Closed richb-hanover closed 1 year ago

richb-hanover commented 3 years ago

I read an intriguing article - Run more stuff in Docker. It showed a solution to a big frustration: getting the right version of Flent, Python, netperf, and all the other libraries onto my computer without screwing up other software.

Is anyone working on a Dockerfile that bundles up Flent with its preferred support packages? This sounds like a good enhancement to the already enhanced 2.0 version. I don't have a lot of time, but might take it on in the next month to six weeks.

tohojo commented 3 years ago

Rich Brown notifications@github.com writes:

I read an intriguing article - Run more stuff in Docker. It showed a solution to a big frustration: getting the right version of Flent, Python, netperf, and all the other libraries onto my computer without screwing up other software.

Is anyone working on a Dockerfile that bundles up Flent with its preferred support packages? This sounds like a good enhancement to the already enhanced 2.0 version. I don't have a lot of time, but might take it on in the next month to six weeks.

I'm not a huge fan of Docker, so no, no plans for this. If you want to take a stab at it, go ahead. It does feel a bit overkill for something as small as Flent, though. What exactly is your problem with getting Flent to run today?

richb-hanover commented 3 years ago

What exactly is your problem with getting Flent to run today?

It's nothing specific to Flent. I install software sporadically. Whenever I do, I face the kinds of problems described in the article (old 2.7 version of Python, some silly version of Qt, etc.) I don't have a formal system for keeping versions under control. I know about nvm, pyenv, but don't keep them updated. (Oh, yes. and brew, as well...)

It's worse on macOS, because its system Python was (or at least formerly) was acknowledged to be ancient. I never really understood which one I was going to get. So...

Thanks.

xciter327 commented 3 years ago

Here is what I setup for a quick n dirty testing. It's a pretty "fat" image, but I don't feel like optimizing it at this point. You can probably do away with a bunch of dependencies if You relegate yourself to cli only Flent. It was based on a previous attempt I saw somewhere here.

FROM ubuntu:hirsute
RUN apt-get update && apt-get install -y locales software-properties-common && \
    sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN add-apt-repository ppa:tohojo/flent
RUN apt-get update
RUN apt install -y flent netperf irtt iperf fping bsdmainutils
RUN apt remove software-properties-common locales -y && apt clean && apt autoremove -y && rm -rf /var/lib/apt/lists/*
RUN chown root.root /usr/bin/fping && chmod 4755 /usr/bin/fping
RUN useradd -U -u 1000 flent
USER flent
tohojo commented 3 years ago

xciter327 @.***> writes:

Here is what I setup for a quick n dirty testing. It's a pretty "fat" image, but I don't feel like optimizing it at this point. You can probably do away with a bunch of dependencies if You relegate yourself to cli only Flent. It was based on a previous attempt I saw somewhere here.

Thanks! I'd be happy to include this as an example in the repository under packaging/ if you'd care to open a pull request for it? :)

teohhanhui commented 3 years ago

Came across https://github.com/cdeex/flent-docker while looking for a Docker image.