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

fix: install curl in final image layer #183

Merged
merged 2 commits into from
Aug 20, 2024
Merged

fix: install curl in final image layer #183

merged 2 commits into from
Aug 20, 2024

Conversation

plyr4
Copy link
Contributor

@plyr4 plyr4 commented Aug 20, 2024

moving apk add curl to the final image layer.

i understand grouping them would be ideal, but that requires a COPY from one alpine layer to another alpine layer.
which is fine, but you would need to also COPY the following shared libraries to make it actually work:

# ldd /usr/bin/curl
	/lib/ld-musl-aarch64.so.1 
	libcurl.so.4 => /usr/lib/libcurl.so.4 
	libz.so.1 => /lib/libz.so.1 
	libc.musl-aarch64.so.1 => /lib/ld-musl-aarch64.so.1 
	libcares.so.2 => /usr/lib/libcares.so.2 
	libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 
	libidn2.so.0 => /usr/lib/libidn2.so.0 
	libpsl.so.5 => /usr/lib/libpsl.so.5 
	libssl.so.3 => /lib/libssl.so.3 
	libcrypto.so.3 => /lib/libcrypto.so.3 
	libzstd.so.1 => /usr/lib/libzstd.so.1 
	libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 
	libunistring.so.5 => /usr/lib/libunistring.so.5 
	libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 

to me, just doing an apk add curl in the final image is more sustainable and readable, considering its not even a scratch image, its alpine.

any thoughts? im open to other suggestion, im also open to just copying those shared libs, but it feels like maintenance hell

@plyr4 plyr4 requested a review from a team as a code owner August 20, 2024 16:22
@plyr4 plyr4 changed the title fix: copy curl from image layer fix: install curl in final image layer Aug 20, 2024
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.26%. Comparing base (000a0dc) to head (c77adac).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #183   +/-   ##
=======================================
  Coverage   41.26%   41.26%           
=======================================
  Files          12       12           
  Lines         761      761           
=======================================
  Hits          314      314           
  Misses        434      434           
  Partials       13       13           

@plyr4 plyr4 merged commit 45d87ef into main Aug 20, 2024
8 of 11 checks passed
@plyr4 plyr4 deleted the fix/curl-copy branch August 20, 2024 16:28
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.

3 participants