2
alpine容器镜像踩坑
source link: https://www.ishells.cn/archives/alpine-error
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
有需求需要做一个容器镜像,然后为了小巧简便,选择了alpine镜像,第一次使用alpine做基础镜像
然后在构建Dockerfile的时候发现当前目录的可执行文件报错not found,开始我以为COPY指令有问题,一再修改检发现没有问题,然后exec进入容器手动执行也是报错not found。我还把Dockerfile的最佳实践改成一行一行的RUN,只为更清楚的看到错误在哪儿(请忽略我下面截图中的多行RUN,仅为排错)
alpine 报错:
centos不报错:
ubuntu不报错
于是我意识到问题出在镜像alpine上
alpine 缺少运行的一些库文件
最终答案来源:
1、https://blog.csdn.net/jinhangdev/article/details/105463453
© 本文著作权归作者所有,转载前请务必署名
Post navigation
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK