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: Add multi-arch builds and Loyalsoldier flavor #3589

Merged
merged 4 commits into from
Jul 29, 2024
Merged

Conversation

mayampi01
Copy link
Contributor

  1. Add multi-arch builds (386, amd64, arm, arm64, loong64, mips, mips64, mips64le, mipsle, ppc64, ppc64le, riscv64, s390x):
    Replace alpine with chainguard/static, which contains only tzdata and ca-certificates without any ELF binaries, can be built with multi-arch static binaries.
    https://hub.docker.com/r/chainguard/static

  2. Use official geoip and geosite by default:
    Default tags use official geoip and geosite, and this is consistent with the Release version.
    Docker builds use official geoip and geosite #3580
    Such as: latest, 1.8.21, main, sha-c07e022

  3. Add Loyalsoldier flavor:
    Loyalsoldier flavor tags with suffix -loyalsoldier or -l (short for Loyalsoldier) use the third-party Loyalsoldier geoip and geosite.
    Such as: latest-loyalsoldier, latest-l, 1.8.21-loyalsoldier, 1.8.21-l, main-loyalsoldier, main-l, sha-c07e022-loyalsoldier, sha-c07e022-l

Demo repo: https://github.com/mayampi01/Xray-core/pkgs/container/xray-core

@mmmray
Copy link
Collaborator

mmmray commented Jul 25, 2024

Personal opinion: multi-arch builds are cool, but unless somebody asks for additional builds we should not provide all of them and reduce the list, it's just more CI time spent and more potential failure. Of course I don't know if some of them are useful but I doubt we need all of them.

are the container images smaller now?

@yuhan6665
Copy link
Member

Agree. Container VM themselves are the mechanism for cross-arch. I object more complexity for the official docker image.

Note there are third party docker build project, you can take a look

@mayampi01
Copy link
Contributor Author

@mmmray

are the container images smaller now?

REPOSITORY                   TAG         IMAGE ID      CREATED       SIZE
ghcr.io/mayampi01/xray-core  latest      636ff1ebc191  25 hours ago  43.4 MB
ghcr.io/xtls/xray-core       latest      a687fbc4a8e6  4 days ago    55.7 MB

@mayampi01
Copy link
Contributor Author

@mmmray Now it takes about 9 minutes to build all the images. I am going to limit the multi-arch to amd64, arm64, loong64, and riscv64.

@mayampi01
Copy link
Contributor Author

@mmmray @yuhan6665 After limiting multi-arch to amd64, arm64, loong64, and riscv64, it now takes about 3 minutes.
It is not much longer than the original 1.5 to 2 minutes.
https://github.com/mayampi01/Xray-core/actions/workflows/docker.yml
https://github.com/XTLS/Xray-core/actions/workflows/docker.yml

I think this is acceptable, loong64 and riscv64 are becoming more popular.
https://www.deepin.org/en/download/

@mmmray
Copy link
Collaborator

mmmray commented Jul 26, 2024

i'm ok with merging this, @yuhan6665 what do you think?

there is still the fact that it changes default geosite to v2fly, but i think it's ok to be consistent with release tarballs

@yuhan6665
Copy link
Member

I still prefer original version. What do you think @RPRX

@RPRX
Copy link
Member

RPRX commented Jul 27, 2024

打算第 1001 个 commit 发 v1.8.22,这个 PR 之后再说

@RPRX
Copy link
Member

RPRX commented Jul 29, 2024

我觉得可以趁着用的人大概还不多把默认 geo 改成 v2fly 的,做到和 releases 一致,不过 tag 太多有点复杂,只加个 -ls 就行了

@RPRX
Copy link
Member

RPRX commented Jul 29, 2024

只加个 -ls 就行了

@mmmray 试着改一下?

@mmmray
Copy link
Collaborator

mmmray commented Jul 29, 2024

i can check it later if the feedback isn't addressed by the author, unless you want this for 1.8.22...

@RPRX
Copy link
Member

RPRX commented Jul 29, 2024

本来想 force-push 他的仓库结果没权限

@RPRX RPRX merged commit 521d8ef into XTLS:main Jul 29, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants