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

๐Ÿ‘ท build: change base image from musl to glibc #3926

Merged
merged 18 commits into from
Sep 19, 2024

Conversation

hezhijie0327
Copy link
Contributor

@hezhijie0327 hezhijie0327 commented Sep 12, 2024

๐Ÿ’ป ๅ˜ๆ›ด็ฑปๅž‹ | Change Type

  • โœจ feat
  • ๐Ÿ› fix
  • โ™ป๏ธ refactor
  • ๐Ÿ’„ style
  • ๐Ÿ‘ท build
  • โšก๏ธ perf
  • ๐Ÿ“ docs
  • ๐Ÿ”จ chore

๐Ÿ”€ ๅ˜ๆ›ด่ฏดๆ˜Ž | Description of Change

ๅŸบไบŽ musl ็š„ Alpine ้•œๅƒๅญ˜ๅœจไธŽๅธธ่ง„ glibc ้•œๅƒๅŠŸ่ƒฝ็š„ๅทฎๅผ‚๏ผŒๅฆ‚ไธŠๆŠฅๆœ€ๅคš็š„ DNS ้—ฎ้ข˜๏ผŒ็Žฐๅฐ†ๆœ€็ปˆ้•œๅƒๅˆ‡ๆขไธบๆ›ดๅŠ ้€š็”จ็š„ glibc ็Žฏๅขƒ

  1. ๅฐ†ๅฝ“ๅ‰ๅŸบไบŽ musl ็š„ node:20-alpine ๅŸบ็ก€้•œๅƒๅˆ‡ๆขๅ›žๅŸบไบŽ glibc ็š„ node:20-slim
  2. ๅฝ“ๅ‰ Image Layer ็ป“ๆž„ๅฆ‚ไธ‹
    a. node:20-slim ๅŸบ็ก€้•œๅƒ
    b. ๆทปๅŠ  busybox & proxychains-ng ่ฝฏไปถๅŒ…๏ผŒ็”จๆˆทๅˆ›ๅปบๅŠ /etc/proxychains4.conf ้…็ฝฎๆ–‡ไปถๆƒ้™่ฎพ็ฝฎ
    c. LobeChat ๅบ”็”จ

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

Copy link

vercel bot commented Sep 12, 2024

@hezhijie0327 is attempting to deploy a commit to the LobeHub Pro Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

๐Ÿ‘ @hezhijie0327

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆๅ‡บๆ‹‰ๅ–่ฏทๆฑ‚ๅนถไธบๆˆ‘ไปฌ็š„็คพๅŒบๅšๅ‡บ่ดก็Œฎ๏ผŒ่ฏท็กฎไฟๆ‚จๅทฒ็ป้ตๅพชไบ†ๆˆ‘ไปฌ็š„่ดก็ŒฎๆŒ‡ๅ—๏ผŒๆˆ‘ไปฌไผšๅฐฝๅฟซๅฎกๆŸฅๅฎƒใ€‚
ๅฆ‚ๆžœๆ‚จ้‡ๅˆฐไปปไฝ•้—ฎ้ข˜๏ผŒ่ฏท้šๆ—ถไธŽๆˆ‘ไปฌ่”็ณปใ€‚

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 92.23%. Comparing base (0c42c46) to head (5006680).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #3926     +/-   ##
=========================================
  Coverage   92.23%   92.23%             
=========================================
  Files         472      472             
  Lines       32741    32741             
  Branches     3192     2031   -1161     
=========================================
  Hits        30198    30198             
  Misses       2543     2543             
Flag Coverage ฮ”
app 92.23% <รธ> (รธ)
server 97.36% <รธ> (รธ)

Flags with carried forward coverage won't be shown. Click here to find out more.

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

@arvinxx
Copy link
Contributor

arvinxx commented Sep 12, 2024

ๆฒกๅคช็œ‹ๆ‡‚ๆœ€ๅŽไธ€ๅฅ่ฏใ€‚ๅฆ‚ๆžœๆขๆˆ slim ๏ผŒๆ‰“ๅŒ…ไฝ“็งฏไผšๅคงๅคšๅฐ‘๏ผŸ่‡ชๅทฑๅšbase้•œๅƒ็š„ๆœ‰ๅ•ฅ้ขๅค–็š„ๆ”ถ็›Šไธ๏ผŸ

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


I didn't quite understand the last sentence. If you change it to slim, how much larger will the packaging volume be? Are there any additional benefits if you make your own base image?

@hezhijie0327
Copy link
Contributor Author

ๅ…ถๅฎžๅชๆ˜ฏ Hub ไธŠๆ˜พ็คบๅคงๅฐๅทฎๅผ‚๏ผŒไฝฟ็”จๅ…ฑ็”จ้•œๅƒๆ˜พ็คบไธบ 0B๏ผŒไฝ†ๅฎž้™…้ฆ–ๆฌกไธ‹่ฝฝๆ—ถ่ฟ˜ๆ˜ฏ่ฆๆŠŠๆ•ดไธช slim ไธ‹่ฝฝไธ‹ๆฅๅชไธ่ฟ‡ไธๆ˜พ็คบๅคงๅฐ

่‡ชๅปบ้•œๅƒๅฏไปฅๅšๅˆฐๅ’Œๅฎ˜ๆ–น slim ไธ€่‡ด็š„ๆ•ˆๆžœ๏ผŒ้ฆ–ๆฌกไธ‹่ฝฝ่พƒๅคงไฝ†ๆ˜ฏๅŽๆœŸไธบๅขž้‡ๆ›ดๆ–ฐ๏ผŒไป…ๆ›ดๆ–ฐๅบ”็”จ้•œๅƒ๏ผŒไฝ†ๅฐบๅฏธ้ข„่ฎก่ƒฝๅ‡ๅฐ‘ 30MB

็ŽฐๅœจๅฐบๅฏธๅขžๅŠ ๅ…ถๅฎžๅชๆ˜ฏๅ› ไธบๆฏๆฌก้ƒฝ่ฆๅฎŒๆ•ด็š„ไธ‹่ฝฝๅŒไธ€ไปฝ node ไบŒ่ฟ›ๅˆถ๏ผŒ่ฟ™ไธชๅฏไปฅ้€š่ฟ‡่‡ชๅปบ่งฃๅ†ณ
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


In fact, it is just a size difference displayed on the Hub. When using a shared image, it is displayed as 0B. However, when actually downloading for the first time, you still have to download the entire slim, but the size is not displayed.

Self-built images can achieve the same effect as the official slim. The first download is larger, but later updates are incremental. Only the application image is updated, but the size is expected to be reduced by 30MB.

The current increase in size is actually just because the same node binary must be downloaded completely every time. This can be solved by self-building.
image

@hezhijie0327
Copy link
Contributor Author

ๆˆ‘ๆœฌๅœฐๆ‹†ๅˆ†ไธ‹็„ถๅŽไธŠไผ  HUB ๅฎž้™…่ฎก็ฎ—ไธ‹

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


I split it locally and uploaded it to HUB for actual calculation.

@hezhijie0327
Copy link
Contributor Author

@arvinxx Base ้•œๅƒ็ผฉๅ‡ 16.57%๏ผˆ7.73MB๏ผ‰๏ผŒApp ้•œๅƒ็ผฉๅ‡ 18.71%๏ผˆ18.42MB๏ผ‰

  1. ไธป็บฟๆ–นๆกˆๅคงๅฐ (Node + LobeChat ไธบๅฎž้™…้ฆ–ๆฌกไธ‹่ฝฝๅคงๅฐ)
    image
    image
    image
  2. ๅฝ“ๅ‰ Commit ๆ–นๆกˆๅคงๅฐ
    image
  3. ๆ‹†ๅˆ†ๆ–นๆกˆ
    image
    image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx Base image reduced by 16.57% (7.73MB), App image reduced by 18.71% (18.42MB)

  1. Mainline plan size (Node + LobeChat is the actual first download size)
    image
    image
    image
  2. Current Commit plan size
    image
  3. Split plan
    image
    image

@hezhijie0327 hezhijie0327 marked this pull request as ready for review September 13, 2024 01:55
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 13, 2024
@hezhijie0327
Copy link
Contributor Author

@arvinxx ๅฎŒๆ•ด็š„ๆž„ๅปบๆต่ตฐไบ†ไธ€ๅœˆ๏ผŒ่ฟ˜ๆ˜ฏๅพˆๆ˜Žๆ˜พ็š„
image

ไธป็บฟ
image
image

้•œๅƒๆœ‰ๆ•ˆๅฑ‚ๆ•ฐๅฏนๆฏ”๏ผˆ็บขๆก†ไธบๆœ‰ๆ•ˆๅฑ‚ๆ•ฐๅคงๅฐ๏ผŒ้ป„ๆก†ไธบ Base ้•œๅƒ๏ผ‰
image
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx The complete build flow went around and it was still obvious
image

Main line
image
image

Comparison of the effective number of mirroring layers (the red box is the effective number of layers, the yellow box is the Base image)
image
image

@arvinxx
Copy link
Contributor

arvinxx commented Sep 13, 2024

image

ๆ„Ÿ่ง‰่ฟ™ไธช้—ฎ้ข˜ไนŸไนŸ่ฆ่€ƒ่™‘ไธ‹๏ผŒไธๆ˜ฏไธ€ๅ‘ณ็š„ไฝ“็งฏๅฐๅฐฑๅฅฝ๏ผŒไธ็„ถไผšๆœ‰ๅพˆๅคš็ปดๆŠคๅ’Œ็ญ”็–‘้—ฎ้ข˜ใ€‚ๆ˜ฏไธๆ˜ฏ็›ธๅฏนไฝ“็งฏๅฏๆŽง็š„ๆƒ…ๅ†ตไธ‹๏ผŒๆขๆˆ slim ๆ˜ฏๆˆๆœฌๆœ€ไฝŽ็š„ๆ–นๆกˆ๏ผŸ

@hezhijie0327
Copy link
Contributor Author

@arvinxx ๅ‚่€ƒไบ† K8S ็š„ gcr.io/distroless/nodejs20-debian12:latest ่ฎพ่ฎก๏ผŒๆœฌๆฅๆ˜ฏไน‹ๅ‰ๆƒณ็›ดๆŽฅไฝฟ็”จๅฎƒ็š„ ไฝ†ๆ˜ฏ GCR Mirror ไธๅ’‹ๅฅฝๆ‰พ๏ผŒๅ†ๅŠ ไธŠ proxychains ็›ฎๅ‰็”ฑ /bin/sh ๆŽงๅˆถๆ˜ฏๅฆๅฏ็”จ๏ผŒไนŸ้œ€่ฆไปŽ busybox ไธญๆๅ–่ฏฅไบŒ่ฟ›ๅˆถๆ–‡ไปถ

่‡ช็ญพ่ฟ™ไธชๆ”ฏๆŒ็š„๏ผŒไธคไธชๆ–นๆกˆ

  1. ่ฎพ็ฝฎ NODE_TLS_REJECT_UNAUTHORIZED="0" ็Žฏๅขƒๅ˜้‡ๅณๅฏ๏ผŒ่ฟ™ๆ˜ฏ node ไบŒ่ฟ›ๅˆถ็š„ๅ‚ๆ•ฐ
  2. ๆŒ‚่ฝฝๅทฒไฟกไปป่‡ช็ญพ่ฏไนฆ็š„ๆœฌๆœบ /etc/ssl/certs/ca-certificates.crt ๆ–‡ไปถๅณๅฏ

image

SLIM ็š„่ฟ‡ไผšๅ„ฟๆˆ‘ Build ไธ‹

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx referred to the gcr.io/distroless/nodejs20-debian12:latest design of K8S. I originally wanted to use it directly before, but the GCR Mirror was not easy to find. In addition, proxychains is currently used by /bin/sh Control whether it is enabled or not, you also need to extract the binary file from busybox

Self-signing supports this, two options

  1. Set the NODE_TLS_REJECT_UNAUTHORIZED="0" environment variable. This is the parameter of the node binary
  2. Mount the local /etc/ssl/certs/ca-certificates.crt file that has trusted the self-signed certificate.

image

I will build SLIM later

@arvinxx
Copy link
Contributor

arvinxx commented Sep 13, 2024

ๅ—ฏ๏ผŒไธป่ฆ็œ‹ไธ‹ไฝ“็งฏ่†จ่ƒ€็š„้—ฎ้ข˜ใ€‚ๅ…ถๅฎžๆˆ‘่ง‰ๅพ—ไธ€ไธช docker ไฝ“็งฏๅœจ 200M ๅŸบๆœฌไธŠๅฐฑๆ˜ฏๅฏไปฅๆŽฅๅ—็š„ใ€‚่ฟ‡ๅคง๏ผˆๆฏ”ๅฆ‚1G๏ผ‰ๅฐฑไผš็‰นๅˆซ่‡ƒ่‚ฟใ€‚ๅœจ้€‚ๅฝ“็š„ๅฐบๅฏธ่Œƒๅ›ดๅ†…ๅ…ถๅฎžๅฏ็ปดๆŠคๆ€ง๏ผˆๅŒ…ๆ‹ฌ่ฟญไปฃๅ’Œ็”จๆˆท็ญ”็–‘๏ผ‰ไผšๆ›ด้‡่ฆไธ€ไบ›ใ€‚

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


Well, it mainly depends on the issue of volume expansion. In fact, I think a docker volume of 200M is basically acceptable. If it is too large (such as 1G), it will be particularly bloated. Maintainability (including iteration and user Q&A) is actually more important within the appropriate size range.

@hezhijie0327
Copy link
Contributor Author

hezhijie0327 commented Sep 13, 2024

@arvinxx ไฝฟ็”จ node:20-slim ๅŽๅบ”็”จๅฑ‚ๅคง่‡ดๆ‰ฉๅขž 13%๏ผˆ13.88MB๏ผ‰๏ผŒPull ่งฃๅŽ‹ๅŽๆ‰ฉๅขž 16% ๏ผˆ49MB๏ผ‰๏ผŒๅฎž้™…่ฟ˜ๅพ—่ฎก็ฎ—ๅฎŒๆ•ด node:20-slim ็š„ๅคงๅฐ๏ผŒๅขžๅŠ  49%๏ผˆ66MB๏ผ‰

image
image

image
image
image
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx After using node:20-slim, the application layer is roughly expanded by 13% (13.88MB). After Pull decompression, the application layer is expanded by 16% (49MB). In fact, the size of the complete node:20-slim must be calculated, and the increase 49% (66MB)

image
image

image
image
image

@BiFangKNT
Copy link

@arvinxx ๅ‚่€ƒไบ† K8S ็š„ gcr.io/distroless/nodejs20-debian12:latest ่ฎพ่ฎก๏ผŒๆœฌๆฅๆ˜ฏไน‹ๅ‰ๆƒณ็›ดๆŽฅไฝฟ็”จๅฎƒ็š„ ไฝ†ๆ˜ฏ GCR Mirror ไธๅ’‹ๅฅฝๆ‰พ๏ผŒๅ†ๅŠ ไธŠ proxychains ็›ฎๅ‰็”ฑ /bin/sh ๆŽงๅˆถๆ˜ฏๅฆๅฏ็”จ๏ผŒไนŸ้œ€่ฆไปŽ busybox ไธญๆๅ–่ฏฅไบŒ่ฟ›ๅˆถๆ–‡ไปถ

่‡ช็ญพ่ฟ™ไธชๆ”ฏๆŒ็š„๏ผŒไธคไธชๆ–นๆกˆ

  1. ่ฎพ็ฝฎ NODE_TLS_REJECT_UNAUTHORIZED="0" ็Žฏๅขƒๅ˜้‡ๅณๅฏ๏ผŒ่ฟ™ๆ˜ฏ node ไบŒ่ฟ›ๅˆถ็š„ๅ‚ๆ•ฐ
  2. ๆŒ‚่ฝฝๅทฒไฟกไปป่‡ช็ญพ่ฏไนฆ็š„ๆœฌๆœบ /etc/ssl/certs/ca-certificates.crt ๆ–‡ไปถๅณๅฏ

image

SLIM ็š„่ฟ‡ไผšๅ„ฟๆˆ‘ Build ไธ‹

่ฏท้—ฎๆ–นๆกˆไธ€

1.่ฎพ็ฝฎ NODE_TLS_REJECT_UNAUTHORIZED="0" ็Žฏๅขƒๅ˜้‡ๅณๅฏ๏ผŒ่ฟ™ๆ˜ฏ node ไบŒ่ฟ›ๅˆถ็š„ๅ‚ๆ•ฐ

ๆ˜ฏๅœจlobe็š„็Žฏๅขƒๅ˜้‡้‡Œ่ฎพ็ฝฎๅ—๏ผŸ่ƒฝ่งฃๅ†ณไป€ไนˆ้—ฎ้ข˜๏ผŸๅบ”่ฏฅไธŽlogtoๆŠฅdns่งฃๆž้”™่ฏฏๆ— ๅ…ณๅง๏ผŸ

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx referred to the gcr.io/distroless/nodejs20-debian12:latest design of K8S. I originally wanted to use it directly before, but the GCR Mirror was not easy to find. In addition, proxychains is currently used by /bin/ sh controls whether it is enabled, and the binary file also needs to be extracted from busybox

Self-signing supports this, two options

  1. Set the NODE_TLS_REJECT_UNAUTHORIZED="0" environment variable. This is the parameter of the node binary
  2. Mount the local /etc/ssl/certs/ca-certificates.crt file that has trusted the self-signed certificate.

![image](https://private-user-images.githubusercontent.com/58100052/367152376-d8e8b99e-09c7-4ac1-a3ce-96ca3a1afc66.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOi JnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYzMTA5MTAsIm5iZiI6MTcyNjMxMDYxMCwicGF0aCI6Ii81ODEwMDA1Mi8zN jcxNTIzNzYtZDhlOGI5OWUtMDljNy00YWMxLWEzY2UtOTZjYTNhMWFmYzY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFL NFpBJTJGMjAyNDA5MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTE0VDEwNDMzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkOWU yNTYxNWFkMDVmNTYzMTZjZjhmZGY0ZWNjZjRlMmRlODUyZTZiODlmZTM1NTFkNWQzMDczZDhhN2 YzYTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZ D0wIn0.eHC735a7nt9nANfRqI9aX_pfXMl6abJYA-tXhGGvOUY)

I will build SLIM later

Please tell me about option one

  1. Set the NODE_TLS_REJECT_UNAUTHORIZED="0" environment variable. This is a parameter of the node binary.

Is it set in the lobe environment variable? What problem can be solved? It should have nothing to do with the dns parsing error reported by logto, right?

@arvinxx
Copy link
Contributor

arvinxx commented Sep 18, 2024

@hezhijie0327 ๆŽจ base ้•œๅƒไผšๅฏผ่‡ดๆ‰€ๆœ‰ vercel ็š„็”จๆˆท breaking ไธ€ๆฌกๅŒๆญฅ๏ผŒๅฆ‚ๆžœๆ— ๅฟ…่ฆๆˆ‘ๅปบ่ฎฎไธ่ฆๅŠจ CI ใ€‚ไปŽไฝ“็งฏๅ˜ๅŒ–ๆฅ่ฏดๆˆ‘่‡ชๅทฑๆ„Ÿ่ง‰ slim ๅฏไปฅๆŽฅๅ—ใ€‚ๅๆญฃๅ“ชๆ€•ๅฐฑ็ฎ—ๆ˜ฏ 150M ไนŸๆฏ”ๅŒ็ฑปๅž‹็š„ OpenWebUI / LibreChat ไฝ“็งฏ้ƒฝ่ฆๅฐ็š„ๅคšๅพ—ๅคšใ€‚

่ฆไธ่ฟ˜ๆ˜ฏๅˆ‡ๆขๅˆฐ slim ๏ผŒ็„ถๅŽๅชไฟ็•™ proxyChain ็š„็‰ˆๆœฌ๏ผŸๆ„Ÿ่ง‰่ฟ™ๆ ทๆˆ‘ไปฌ้œ€่ฆ้ขๅค–็ปดๆŠค็š„ๆˆๆœฌไผšๅฐไธ€ไบ›

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@hezhijie0327 Pushing the base image will cause all vercel users to break the synchronization at one time. I recommend not touching CI if it is not necessary. In terms of volume change, I feel slim is acceptable. Anyway, even 150M is much smaller than the same type of OpenWebUI / LibreChat.

Or switch to slim and only keep the proxyChain version? I feel like the extra maintenance costs we need will be smaller this way.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 19, 2024
@hezhijie0327
Copy link
Contributor Author

@arvinxx ๆžๅฎšไบ†

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx Got it

@hezhijie0327
Copy link
Contributor Author

hezhijie0327 commented Sep 19, 2024

@arvinxx ๅฐ่ฏ•ไบ†ไธ€ไธชๆ–ฐๆ–นๆณ•๏ผŒ่ƒฝ่พพๆˆๅŒไธ€็›ฎ็š„๏ผŒๆœ‰ glibc ็š„ๅบ•ๅฑ‚ๆ— ้œ€็‹ฌ็ซ‹ Base ้•œๅƒ๏ผŒไฝ†ๆ˜ฏๅฐบๅฏธไธŽๅฝ“ๅ‰็š„ Alpine ๅนณ้ฝ็”š่‡ณๆ›ดไผ˜๏ผŒ่ฟ‡ไผšๅ„ฟๆ‹†ไธ€ไธชๆ–ฐ PR ็œ‹็œ‹๏ผŸ
image
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx tried a new method, which can achieve the same purpose. It has the bottom layer of glibc, but the size is the same as or even better than the current Alpine. Will you open a new PR later and take a look?
image
image

@arvinxx
Copy link
Contributor

arvinxx commented Sep 19, 2024

@hezhijie0327 ๅฏไปฅๅ•Š๏ผŒ่ฟ™ไธชๆขๆˆ slim ๆฒกๅ•ฅ้—ฎ้ข˜็š„่ฏๆˆ‘ๅ…ˆๅˆไบ†๏ผŒๆ–ฐๆ–นๆณ•ๅฆๅค–ๆไธ€ไธช PR ๅ†ไธ€่ตท็œ‹็œ‹~

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@hezhijie0327 Yes, if there is no problem with changing this to slim, I will combine it first. I will submit a PR for the new method and then we will take a look~

@hezhijie0327
Copy link
Contributor Author

ๆฒกๅ•ฅ้—ฎ้ข˜ไบ†๏ผŒๆœฌๅœฐ Build ้ƒฝ่ฟ‡ไบ†

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


There is no problem anymore, the local build has passed.

@arvinxx arvinxx merged commit 61d2f53 into lobehub:main Sep 19, 2024
5 of 7 checks passed
@lobehubbot
Copy link
Member

โค๏ธ Great PR @hezhijie0327 โค๏ธ

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
้กน็›ฎ็š„ๆˆ้•ฟ็ฆปไธๅผ€็”จๆˆทๅ้ฆˆๅ’Œ่ดก็Œฎ๏ผŒๆ„Ÿ่ฐขๆ‚จ็š„่ดก็Œฎ! ๅฆ‚ๆžœๆ‚จๅฏน LobeHub ๅผ€ๅ‘่€…็คพๅŒบๆ„Ÿๅ…ด่ถฃ๏ผŒ่ฏทๅŠ ๅ…ฅๆˆ‘ไปฌ็š„ discord๏ผŒ็„ถๅŽ็งไฟก @arvinxx ๆˆ– @canisminor1990ใ€‚ไป–ไปฌไผš้‚€่ฏทๆ‚จๅŠ ๅ…ฅๆˆ‘ไปฌ็š„็งๅฏ†ๅผ€ๅ‘่€…้ข‘้“ใ€‚ๆˆ‘ไปฌๅฐ†ไผš่ฎจ่ฎบๅ…ณไบŽ Lobe Chat ็š„ๅผ€ๅ‘๏ผŒๅˆ†ไบซๅ’Œ่ฎจ่ฎบๅ…จ็ƒ่Œƒๅ›ดๅ†…็š„ AI ๆถˆๆฏใ€‚

@lobehubbot
Copy link
Member

๐ŸŽ‰ This PR is included in version 1.19.3 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Sep 21, 2024
@hezhijie0327 hezhijie0327 deleted the glibc branch September 22, 2024 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants