-
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
Changes from 1 commit
1fd9ead
c839aa4
a0c330f
e59035d
6c4b68b
1be0c67
3bf2a4f
914883a
3b76e80
a88a4b2
35d5e68
eee8ef9
de4e681
cb31387
f0fa526
8aa167e
23f7cbb
7f28255
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 \ | ||
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 commentThe 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, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
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"] |
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.
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