Skip to content
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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM alpine:latest AS builder

RUN apk update && apk add --no-cache \
git \
build-base \
openssl-dev \
libpcap-dev \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what?

Copy link
Author

@Viktor45 Viktor45 Sep 13, 2024

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

linux-headers \
musl-dev

RUN git clone https://github.com/hufrea/byedpi /opt/byedpi
Copy link

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.

Copy link
Author

@Viktor45 Viktor45 Aug 20, 2024

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

Copy link

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

Copy link
Author

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.


WORKDIR /opt/byedpi

RUN make

FROM alpine:latest

COPY --from=builder /opt /opt

EXPOSE 1080

ENTRYPOINT ["/opt/byedpi/ciadpi"]
6 changes: 6 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ make, gcc/clang для Linux, mingw для Windows
Linux: make
Windows: make windows CC=x86_64-w64-mingw32-gcc

------
### Docker

docker build ./ -t byedpi:latest
docker run -p 1080:1080 -ti byedpi:latest ciadpi --disorder 1 --split 1

------
### Дополнительная информация о DPI, источники идей
https://github.com/bol-van/zapret/blob/master/docs/readme.txt
Expand Down