unable prepare context:unable to evaluate symlinks in Dockerfile path:lstat /XXXXXX

这篇具有很好参考价值的文章主要介绍了unable prepare context:unable to evaluate symlinks in Dockerfile path:lstat /XXXXXX。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

问题描述

今天在构建镜像文件时 报错 unable prepare context:unable to evaluate symlinks in Dockerfile path:lstat 根据提示是说 找不到当前我们要构建的 文件。

[root@weihu mydocker]# docker build -t centosjava8:1.8 .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /myfile/Dockerfile: no such file or directory

原因分析:

一般出现这种提示都是没有在我们需要构建 镜像文件的根目录下面执行的命令,所以返回报错信息。


解决方案:

我们可以指定 需要构建的dockerfile文件的绝对路径即可。
命令行参数
-f,–file
指定 dockerfile 路径

docker build -f /path/to/a/Dockerfile .

不指定的话,默认会读取上下文路径( . )下的 dockerfile

-t,–tag
指定构建的镜像名和 tag

docker build -t ubuntu-nginx:v1 . 

例如:
我需要构建的镜像路径为 /myfile/Dockerfile,指定构建镜像名称为 coentosjava81.5.7
可以这样输入命令行

注意:上面TAG后面有个点 . 千万不漏了!!!!!!!!!!!!文章来源地址https://www.toymoban.com/news/detail-432711.html

docker build -f /myfile/Dockerfile -t coentosjava81.5.7 .

到了这里,关于unable prepare context:unable to evaluate symlinks in Dockerfile path:lstat /XXXXXX的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • 异常报错:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

    异常报错:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

    问题描述 异常信息: 第一类错误 Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause 第二类错误 Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing fai

    2023年04月19日
    浏览(9)
  • 已解决异常:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

    已解决异常:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

    已解决异常:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception 今天开发的时候,遇到了这个bug: “dispatcherServlet” 的异常问题。 详细报错如下: 起初还以为是 SpringBoot 底层框架的问题,毕竟涉及到了 DispatcherServlet 。 但是仔细看了之后发现问题不是这么

    2024年02月10日
    浏览(6)
  • unable to find valid certification path to requested target

    unable to find valid certification path to requested target

    调用https接口时出现该异常, Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target   原因是可以看上图,因为本地没有目标服务器证书导致。解决此方法的两种方案,1.在运行

    2024年02月02日
    浏览(28)
  • 程序启动报错org.springframework.context.ApplicationContextException: Unable to start web server

    1、该项目在Linux和本机电脑上启动都正常 2、在另一台电脑上启动就报错 3、代码都是同一份,没有差别 导入spring-boot-starter-tomcat依赖时定义的scope导致 原依赖导入配置 调整后依赖导入配置 注:本机就算是provided也能正常启动,另一台电脑上就不行,应该是运行环境上的差异

    2024年02月15日
    浏览(8)
  • 报错 unable to find valid certification path to requested target executing

    提示信息: 审核失败!sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target executing POST 。。。 。。。 出现原因 这个问题的根本原因是你安装JDK时,Javajar 1.8.0_141libext里面缺少了一

    2024年02月03日
    浏览(36)
  • Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept

    Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept

    SpringBoot项目启动报错,如图 Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.这个错误 可以看出ServletWebServerFactory在sping容器启动时没有将其注册进去,缺少相关依赖。没有

    2024年02月14日
    浏览(6)
  • Maven 私服 unable to find valid certification path to requested target 错误

    你遇到的错误信息 “sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target” 表明在 SSL/TLS 握手过程中,证书路径验证失败。这通常是由于缺少或不受信任的证书导致的,Maven 无法与远

    2024年02月08日
    浏览(36)
  • https请求报错unable to find valid certification path to requested target解决

    https请求报错unable to find valid certification path to requested target解决

            在Java项目中请求HTTPS时,可能会遇到 \\\"unable to find valid certification path to requested target\\\" 错误。这个错误通常是由于SSL证书问题引起的。要解决此问题,可以尝试以下方法 1.忽略SSL验证         OkHttpClient封装请求         HttpURLConnection请求         RestTemplate请求

    2024年02月08日
    浏览(32)
  • 彻底解决:SunCertPathBuilderException: unable to find valid certification path to requested target错误的方法

    彻底解决:SunCertPathBuilderException: unable to find valid certification path to requested target错误的方法

    请求12306系统查票。之前正常的,现在提示这样的错误: Exception in thread \\\"main\\\" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 如下图:  导致原因:由

    2024年02月05日
    浏览(33)
  • 2.2.1版本nacos报错org.springframework.context.ApplicationContextException: Unable to start web server; n

    2.2.1版本nacos报错org.springframework.context.ApplicationContextException: Unable to start web server; n

      报错信息: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat Caused by: java.lang.IllegalArgumentException: the length of secret key must great than or equal 32 bytes; And the secret key  must be encoded by b

    2024年02月03日
    浏览(9)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包