Docker常见bug

本文记录一下Docker的常见bug:

报错 Builder lifecycle 'creator' failed with status code 51

原因:在构建image的过程中,使用代理下载github上的依赖项。这可能导致错误。详见资料5
解决方案:

参考资料:

  1. Cloud Native Buildpacks/Paketo with Java/Spring Boot: How to configure different JDK download uri (e.g. no access to github.com) - Stack Overflow
  2. 落叶飘:有对应gitee仓库
  3. https://raw.githubusercontent.com/paketo-buildpacks/bellsoft-liberica/main/buildpack.toml
  4. How To Configure Paketo Buildpacks - Paketo Buildpacks
  5. github bellsoft-jre17.0.5+8-linux-amd64.tar.gz x509: certificate signed by unknown authority · Issue #353 · paketo-buildpacks/bellsoft-liberica · GitHub
  6. docker - How to set dependency-mapping binding in gradle bootBuildImage (Spring-boot 2.7.1, native) - Stack Overflow
  7. Image building with newer Paketo base-platform-api-0.3 fails · Issue #23009 · spring-projects/spring-boot · GitHub

Docker一直处于"Docker is staring…"界面

以管理员身份打开powershell,运行:

Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All

重启电脑。

参考资料:

  1. Docker forever in “Docker is starting…” at Windows task - Stack Overflow
  2. Solve Problem Docker stucks and still in starting mode - YouTube
  3. c# - How to enable the Windows 10 “Containers” feature? - Stack Overflow

运行docker build后出现no matching manifest for windows/amd64 in the manifest list entries

解决方案:右键docker图标Switching to Linux containers

参考资料:

  1. Docker: “no matching manifest for windows/amd64 in the manifest list entries” - Stack Overflow