Build Failure Related
Build phase issues are mostly docker errors, largely due to incorrect configuration of Dockerfile. Refer to Optimizing Container Images or search online for docker-related solutions and tutorials.
How to handle the error message "network connection aborted."?
Due to the uncontrollable instability in accessing foreign networks, it is recommended to use domestic sites as mirror sources for downloading dependencies and extensions.
How to handle missing dependency errors? For example: java.lang.NoClassDefFoundError: Could not initialize class xxx
The Dockerfile lacks the corresponding dependency installation command. It is recommended to prioritize using a more complete build base image rather than directly adding dependency installation commands (RUN apk xxx), as it is simpler, more convenient, and can improve build speed. Go to the GitHub-Containers official repository on Docker Hub to select a suitable base image (which by default includes all the dependencies you need), then replace the "FROM xxxxx as build" command in your Dockerfile.
How to handle the error message "xxxxxx: no such file or directory"?
- Ensure that the file indeed exists in the code repository/code package and the path is correct.
- Ensure that this file is not included in .gitignore or .dockerignore. If included, it will be ignored during the build. Simply remove it.
- Ensure that the COPY command in the Dockerfile does not modify the original file paths when copying files.
How to handle when no error logs are displayed and the screen is blank?
It is highly likely that the build timed out (> 10 minutes). Please optimize the container image to improve build speed and prevent timeouts.