这个openliberty docker错误的原因是什么

问题描述

只需遵循产品文档说明: 请参阅错误日志消息。 不确定错误是什么以及如何修复它。

mvn 自由:devc

[INFO] Scanning for projects...
[INFO]
[INFO] ------------< io.openliberty.guides:guide-getting-started >-------------
[INFO] Building guide-getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- liberty-maven-plugin:3.3.4:devc (default-cli) @ guide-getting-started ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty- kernel:null:21.0.0.3:zip.
[INFO] CWWKM2102I: Using installDirectory : /home/zahid/Liberty-eclipse/guide-getting-started/start/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /home/zahid/Liberty-eclipse/guide-getting-started/start/target/liberty/wlp/usr/servers/defaultServer.
[INFO] Running maven-compiler-plugin:compile
[INFO] copying 1 file to /home/zahid/Liberty-eclipse/guide-getting-started/start/target/liberty/wlp/usr/servers/defaultServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /home/zahid/Liberty-eclipse/guide-getting-started/start/src/main/liberty/config/server.xml.
[INFO] Building Docker image...
[INFO] docker build --pull -f /tmp/tempDockerfile17415566016391532686 -t guide-getting-started-dev-mode /home/zahid/Liberty-eclipse/guide-getting-started/start
[ERROR] unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /tmp/tempDockerfile17415566016391532686: no such file or directory
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.343 s
[INFO] Finished at: 2021-03-20T16:28:39Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.3.4:devc (default-cli) on project guide-getting-started: Could not build Docker image using Dockerfile: /home/zahid/Liberty-eclipse/guide-getting-started/start/Dockerfile. Address the following docker build error and then start dev mode again: unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /tmp/tempDockerfile17415566016391532686: no such file or directory RC=1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

解决方法

无法准备上下文:无法评估 Dockerfile 路径中的符号链接:lstat

解决方案:从 Ubuntu 20.04 中删除 snappy 版本

$ sudo snap 删除泊坞窗

然后使用这些说明进行安装 https://docs.docker.com/engine/install/ubuntu/#uninstall-docker-engine

问题:docker 的 Snappy 安装被破坏了。