-
Notifications
You must be signed in to change notification settings - Fork 128
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
Docker support #72
base: main
Are you sure you want to change the base?
Docker support #72
Conversation
Added simple dockerfile and manual line
Dockerfile
Outdated
linux-headers \ | ||
musl-dev | ||
|
||
RUN git clone https://github.com/hufrea/byedpi /opt/byedpi |
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 is no need for cloning the repo, because we already have it with Dockerfile. So, COPY . /opt/byedpi
.
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 is no need for cloning the repo, because we already have it with Dockerfile. So,
COPY . /opt/byedpi
.
Sometimes users just downloads one Dockerfile at all, instead of full repo. I think Dockerfile can be self-contained, no need to download all repository code to operating systems that don't have git installed, you might not even have a compiler on the host
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.
Anyway, fetching specified version always better than fetching latest master
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.
Anyway, fetching specified version always better than fetching latest master
Great advice, thanks! Fixed to latest release code.
resolving conflicts
markdown fix
git clone latest release fix
SonarLint fixes
Dockerfile
Outdated
build-base \ | ||
curl \ | ||
git \ | ||
libpcap-dev \ |
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.
For what?
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.
For what?
Ok, Removed unnecessary dependencies
build-base + linux headers = build tools + linux/tcp.h
curl + git = getting latest github release code from releases only, not master
Removed unnecessary dependencies
README.md
Outdated
|
||
```sh | ||
docker build ./ -t byedpi:latest | ||
docker run -p 1080:1080 -ti byedpi:latest ciadpi --disorder 1 --split 1 |
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.
split
is meaningless in the same position as disorder
(it won't send anything).
I think this should be moved to |
Update as requested
moved |
|
||
```sh | ||
docker build ./ -t byedpi:latest | ||
docker run -p 1080:1080 -ti byedpi:latest ciadpi --disorder 1 --auto=torst --tlsrec 1+s |
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.
Add debug logs for docker:
--disorder 1 --auto=torst --tlsrec 1+s --debug 1
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.
Add debug logs
This is just an example! You need to make your parameters yourself!
dist/Dockerfile
Outdated
curl \ | ||
git \ | ||
linux-headers && \ | ||
git clone -b \ |
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.
Better split git clone
and apk add
, see https://github.com/tazihad/byedpi-docker/blob/main/Dockerfile
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.
OK
Split RUN layers as requested
@hufrea Any progress? |
Guys, did you have any issues running the app inside docker? I tried to do it on mac os using Docker Desktop for Mac with the following dockerfile: FROM alpine:latest
ARG version=v0.14.1
ARG filename=byedpi-14.1-x86_64.tar.gz
WORKDIR /app
RUN \
wget https://github.com/hufrea/byedpi/releases/download/${version}/${filename} \
&& tar xzf ${filename}
EXPOSE 1080
CMD ["./ciadpi-x86_64", "--oob", "3"] and when I built it and ran it (
This option works perfect for byedpi directly running on mac os (I built it natively) but it does not work inside docker for mac. I think it can be related to docker network layer (I guess it somehow fragments tcp packets or so) but I have no proofs. Other options like If I'm right and docker network layer (at least for bridge network) is reason for this error then there are some limitations for dockerizing the app. |
use issues instead, dont mix -P and -p options. |
It happens in any case so looks like it does not matter for docker.
I'll recheck it after the PR is merged and then will create an issue. [UPDATE]: checked it on vps with ubuntu and did not face with the issue. So it most likely related to docker desktop for mac (I guess due to hypervisor). Wireshark shows there is no tcp packet with URG flag in that case, so tcp data is malformed somehow. |
Added simple dockerfile and manual line