在Dockerfile中使用指令ENTRYPOINT来执行项目下entrypoint.shshell文件,如下:

ENTRYPOINT ["./entrypoint.sh"]

时报错提示:

Exec: "./entrypoint.sh": permission denied

很明显问题在于用户没有文件的执行权限。

解决方法有两种:

  1. 赋予shell文件可执行权限

    RUN chmod +x entrypoint.sh
  2. sh作为ENTRYPOINT数组的第一个参数(推荐)

    ENTRYPOINT ["sh", "./entrypoint.sh"]

推荐使用第二种方式,因为不需要再额外去执行chmod

原文地址:http://www.fidding.me/article/100

docker使用entrypoint执行时报permission denied错误的更多相关文章

  1. Android Permission denied 错误 ( 附Android权限大全 )

    Android Permission denied 错误(附Android权限大全) java.net.SocketException: Permission denied (maybe missin ...

  2. npm install 时出现的 EACCES: permission denied 错误的可能有效的解决方案

    最近我开始接触手机 app 的编写,公司用到了 Nativescript.当我下载了公司的项目后,在配置时出现了不少的问题,其中出现概率最高的就是 EACCES: permission denied ...

  3. Nginx的Permission denied错误

    Nginx的Permission denied错误 环境: CentOS7 问题描述 今天搭建了nginx+uwsgi+django的环境,之后通过浏览器访问遇到下面问题: 2017/03/31 19 ...

  4. vsftpd安装配置 530 Permission denied.错误

    yum install vsftpd service vsftpd start 530 Permission denied.错误 /etc/vsftpd/user_list    该文件里的用户账户在 ...

  5. sendto() 向广播地址发包返回errno 13, Permission denied错误

    http://blog.csdn.net/guanghua2_0beta/article/details/52483916 sendto() 向广播地址发包返回errno 13, Permission ...

  6. 通过API获取统计信息时报Access denied错误处理记录

    通过API获取HDFS统计信息时报Access denied错误信息,错误信息如下: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.s ...

  7. EBS R12.2.0启动时报"httpd.pid: Permission denied"错误

    启动应用服务: $ /app/oracle/apps/VIS/fs1/inst/apps/VIS_erptest/admin/scripts/adstrtal.sh apps/apps 报出如下错误: ...

  8. 解决:/bin/sh: 1: /home/**/custom_app.sh: Permission denied错误

    出现如下错误,一般是执行权限不够. /bin/sh: : /home/custom_app.sh: Permission denied 解决方法是:cd 到此文件目录,对提示的文件赋予可执行权限或读写 ...

  9. Bash . configure permission denied错误

    当你在Linux(我这里是Ubuntu10.04LTS Desktop)下编译安装某个包的时候,你首先是进入到解压目录然后执行“$ ./configure”的,但是有时候你会发现提示错误,错误提示是这 ...

随机推荐

  1. python-javascript之bom

    BOM BOM介绍 全称 Browser Object Mode 浏览器对象模式 操作浏览器的API接口.比如浏览器自动滚动 Windows对象的顶层部分是BOM的顶层(核心)对象,所有的对象都是通过 ...

  2. 洛谷 P1346 电车——dijstra

    上一波题目 https://www.luogu.org/problem/P1346 是道水题 路口一开始对着的那条路权值为0 其余路权值为1 然后跑一遍最短路就好了 qwq #include<c ...

  3. Memory layout of x86_64 in Linux

    Blue : User Space 128TBRed : Kernel Space 512MBThe rest of the address space goes to various parts o ...

  4. IIS Express 不允许的父路径

    IIS Express 启动一个asp的网站,出现一个错误 Active Server Pages 错误 'ASP 0131' 不允许的父路径 对于IIS可以在可视化的IIS Manager中配置: ...

  5. js确认末尾字符算法挑战

    检查一个字符串(str)是否以指定的字符串(target)结尾. 如果是,返回true;如果不是,返回false. 这个挑战可以通过在ES2015中引入的.endsWith()方法来解决.但是出于这个 ...

  6. WPFのStyle TargetType的不同写法

    一.隐式写法 <Style TargetType="TextBlock"> <Setter Property="/> </Style> ...

  7. 【教程】linux安装nginx(详细)

    博主最近在安装Nginx,虽然之前安装过,但是没有记录安装过程,导致现在安装过程中遇到坑,现记录一下,希望能帮助到你. 1:安装编译工具及库文件 yum -y install make zlib zl ...

  8. 大哥带我走渗透4(中)----oracle报错注入

    5/30 报错注入 0x01 准备阶段 1. 基础知识今天了解了,但是,只能看懂和最基本的理解,不能自己上路.所以,还是要不停学习基础.并且及时总结.这有一篇很详细的文章:https://www.cn ...

  9. setmetamode - define the keyboard meta key handling

    总览 setmetamode [ meta|bit|metabit | esc|prefix|escprefix ] 描述 没有参数时, setmetamode 将打印当前 Meta 键模式; 有参数 ...

  10. SHELL自动化--接口测试

    #!/bin/bash fileNum=`ls /bin/testShell/apiCheck_shell/logs/ | grep $(date "+%Y-%m-%d") | w ...