BLOG-90 Fix backend docker build error #123

Merged
squid merged 1 commits from BLOG-122_fix_backend_build_error into main 2025-08-06 21:44:06 +08:00
Owner

Description

  • Using alpine for build environment.

https://g.co/gemini/share/ad84493a13dd

Package Changes

No response

Screenshots

No response

Reference

Resolves #122.

Checklist

  • A milestone is set
  • The related issuse has been linked to this branch
### Description - Using `alpine` for build environment. <https://g.co/gemini/share/ad84493a13dd> ### Package Changes _No response_ ### Screenshots _No response_ ### Reference Resolves #122. ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch
squid added this to the 0.3 milestone 2025-08-06 21:41:49 +08:00
squid added 1 commit 2025-08-06 21:41:49 +08:00
BLOG-90 fix: update Dockerfile to use alpine base and simplify build process
All checks were successful
Frontend CI / build (push) Successful in 1m22s
Auto Comment On PR / add_improve_comment (pull_request) Successful in 17s
PR Title Check / pr-title-check (pull_request) Successful in 16s
5d686e2c71
Collaborator

/improve

/improve
Collaborator

PR Code Suggestions

CategorySuggestion                                                                                                                                    Impact
General
Remove unnecessary OpenSSL dependencies

Verify if your Rust application truly requires OpenSSL. If it uses a pure Rust TLS
implementation like rustls, the openssl-dev and openssl-libs-static packages are
unnecessary. Removing them can reduce build time and potentially the final binary
size.

backend/Dockerfile [2]

-RUN apk add --no-cache build-base openssl-dev openssl-libs-static
+RUN apk add --no-cache build-base
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a potential optimization by removing unnecessary openssl dependencies, which can reduce image size and build time. It's a valid point to verify if the Rust application truly requires OpenSSL.

Medium
## PR Code Suggestions ✨ <!-- --> <table><thead><tr><td><strong>Category</strong></td><td align=left><strong>Suggestion&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </strong></td><td align=center><strong>Impact</strong></td></tr><tbody><tr><td rowspan=1>General</td> <td> <details><summary>Remove unnecessary OpenSSL dependencies</summary> ___ **Verify if your Rust application truly requires OpenSSL. If it uses a pure Rust TLS <br>implementation like <code>rustls</code>, the <code>openssl-dev</code> and <code>openssl-libs-static</code> packages are <br>unnecessary. Removing them can reduce build time and potentially the final binary <br>size.** [backend/Dockerfile [2]](https://git.squidspirit.com/squid/blog/src/branch/BLOG-122_fix_backend_build_error/backend/Dockerfile#L2-L2) ```diff -RUN apk add --no-cache build-base openssl-dev openssl-libs-static +RUN apk add --no-cache build-base ``` <details><summary>Suggestion importance[1-10]: 7</summary> __ Why: The suggestion correctly identifies a potential optimization by removing unnecessary `openssl` dependencies, which can reduce image size and build time. It's a valid point to verify if the Rust application truly requires OpenSSL. </details></details></td><td align=center>Medium </td></tr></tr></tbody></table>
squid changed title from BLOG-90 fix: update Dockerfile to use alpine base and simplify build process to BLOG-90 Fix backend docker build error 2025-08-06 21:43:09 +08:00
Author
Owner

Verify if your Rust application truly requires OpenSSL. If it uses a pure Rust TLS
implementation like rustls, the openssl-dev and openssl-libs-static packages are
unnecessary. Removing them can reduce build time and potentially the final binary
size.

backend/Dockerfile [2]

-RUN apk add --no-cache build-base openssl-dev openssl-libs-static
+RUN apk add --no-cache build-base

Yes, these openssl related packages are required.

> **Verify if your Rust application truly requires OpenSSL. If it uses a pure Rust TLS <br>implementation like <code>rustls</code>, the <code>openssl-dev</code> and <code>openssl-libs-static</code> packages are <br>unnecessary. Removing them can reduce build time and potentially the final binary <br>size.** > > [backend/Dockerfile [2]](https://git.squidspirit.com/squid/blog/src/branch/BLOG-122_fix_backend_build_error/backend/Dockerfile#L2-L2) > > ```diff > -RUN apk add --no-cache build-base openssl-dev openssl-libs-static > +RUN apk add --no-cache build-base > ``` Yes, these openssl related packages are required.
squid merged commit a9df43943e into main 2025-08-06 21:44:06 +08:00
squid deleted branch BLOG-122_fix_backend_build_error 2025-08-06 21:44:06 +08:00
Sign in to join this conversation.
No description provided.