-
Notifications
You must be signed in to change notification settings - Fork 313
remove upx #4709
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
remove upx #4709
Conversation
Signed-off-by: Javier Lopez <javier@okteto.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4709 +/- ##
==========================================
+ Coverage 48.85% 48.87% +0.02%
==========================================
Files 354 354
Lines 29522 29522
==========================================
+ Hits 14424 14430 +6
+ Misses 13952 13948 -4
+ Partials 1146 1144 -2 🚀 New features to boost your workflow:
|
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.
Minor comments to update comments to prevent misunderstandings, as we are not compressing the binaries anymore, but changes look good
Dockerfile
Outdated
&& tar -xf /usr/bin/upx.tar.xz -C /tmp \ | ||
&& cp /tmp/upx-4.2.1-amd64_linux/upx /usr/bin/upx \ | ||
&& chmod +x /usr/bin/upx | ||
|
||
# Stage 2: Compress Okteto utility binaries to reduce final image size |
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.
# Stage 2: Compress Okteto utility binaries to reduce final image size | |
# Stage 2: Prepare binaries to be copied in final stages |
Dockerfile
Outdated
|
||
# Stage 3: Set up Go build environment for Kubernetes tools and Okteto CLI | ||
FROM golang:${GOLANG_VERSION}-bookworm AS golang-builder | ||
COPY --from=upx-provider /usr/bin/upx /usr/bin/upx | ||
|
||
# Stage 3.1: Download and compress kustomize (Kubernetes resource customization tool) |
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.
# Stage 3.1: Download and compress kustomize (Kubernetes resource customization tool) | |
# Stage 3.1: Download kustomize (Kubernetes resource customization tool) |
Dockerfile
Outdated
@@ -66,12 +45,7 @@ RUN curl -sLf --retry 3 -o kustomize.tar.gz \ | |||
&& chmod +x /usr/local/bin/kustomize \ | |||
&& rm kustomize.tar.gz \ | |||
# Verify binary works before compression |
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.
# Verify binary works before compression | |
# Verify binary works |
Dockerfile
Outdated
&& /usr/bin/upx --best --lzma /tmp/kustomize \ | ||
# Verify compressed binary still works | ||
&& /tmp/kustomize version | ||
&& /usr/local/bin/kustomize version | ||
|
||
# Stage 3.2: Download and compress kubectl (Kubernetes CLI) |
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.
# Stage 3.2: Download and compress kubectl (Kubernetes CLI) | |
# Stage 3.2: Download kubectl (Kubernetes CLI) |
Dockerfile
Outdated
@@ -82,12 +56,7 @@ RUN curl -sLf --retry 3 -o kubectl \ | |||
&& chmod +x kubectl \ | |||
&& mv kubectl /usr/local/bin/ \ | |||
# Verify binary works before compression |
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.
# Verify binary works before compression | |
# Verify binary works |
Dockerfile
Outdated
&& /usr/bin/upx --best --lzma /tmp/kubectl \ | ||
# Verify compressed binary still works | ||
&& /usr/local/bin/kubectl version --client=true | ||
&& /usr/local/bin/kubectl version --client=true | ||
|
||
# Stage 3.3: Download and compress Helm (Kubernetes package manager) |
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.
# Stage 3.3: Download and compress Helm (Kubernetes package manager) | |
# Stage 3.3: Download Helm (Kubernetes package manager) |
Dockerfile
Outdated
@@ -101,12 +70,7 @@ RUN curl -sLf --retry 3 -o helm.tar.gz \ | |||
&& chmod +x /usr/local/bin/helm \ | |||
&& rm -rf helm helm.tar.gz \ | |||
# Verify binary works before compression |
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.
# Verify binary works before compression | |
# Verify binary works |
Dockerfile
Outdated
&& /usr/bin/upx --best --lzma /tmp/helm \ | ||
# Verify compressed binary still works | ||
&& /tmp/helm version | ||
&& /usr/local/bin/helm version | ||
|
||
# Stage 3.4: Download and compress git (Version control system) |
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.
# Stage 3.4: Download and compress git (Version control system) | |
# Stage 3.4: Download git (Version control system) |
Dockerfile
Outdated
@@ -176,19 +135,19 @@ FROM busybox:${BUSYBOX_VERSION} | |||
COPY --link --chmod=755 --from=certs /etc/ssl/certs /etc/ssl/certs | |||
|
|||
# Step 2: Copy compressed Kubernetes tools |
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.
# Step 2: Copy compressed Kubernetes tools | |
# Step 2: Copy Kubernetes tools |
Signed-off-by: Javier Lopez <javier@okteto.com>
* remove upx Signed-off-by: Javier Lopez <javier@okteto.com> * refactor: update comments for clarity in Dockerfile stages Signed-off-by: Javier Lopez <javier@okteto.com> --------- Signed-off-by: Javier Lopez <javier@okteto.com> (cherry picked from commit a0213b8)
* remove upx Signed-off-by: Javier Lopez <javier@okteto.com> * refactor: update comments for clarity in Dockerfile stages Signed-off-by: Javier Lopez <javier@okteto.com> --------- Signed-off-by: Javier Lopez <javier@okteto.com> (cherry picked from commit a0213b8) Co-authored-by: Javier López Barba <javier@okteto.com>
Remove upx so we can have CVEs reports