来自守护进程的错误响应:OCI 运行时创建失败:container_linux.go:370:权限被拒绝:未知

时间:2021-02-24 13:43:48

标签: docker mule

在 docker 桌面中运行 Mule Standalone 服务器时出错。下面是 Dockerfile:

FROM java:openjdk-8-jdk

RUN rm -rf Mule
RUN mkdir Mule

#Add  Mule runtime from our local system to the Docker container
CMD echo "--- Adding Mule4.2.0 runtime in Docker Container ---"
ADD  mule-enterprise-standalone-4.2.0.zip /Mule

#Adding Work Directory
CMD echo "--- Adding Work Directory ---"
WORKDIR /Mule

#Extract and install the Mule runtime in the container
CMD echo "--- Unzipping the added zip ---"
RUN         unzip mule-enterprise-standalone-4.2.0.zip && \
            rm mule-enterprise-standalone-4.2.0.zip
            
# Define volume mount points
VOLUME      ["/Mule/mule-enterprise-standalone-4.2.0/logs", "/Mule/mule-enterprise-standalone-4.2.0/apps", "/Mule/mule-enterprise-standalone-4.2.0/domains"]

#Check if Mule Licence installed
RUN ls -ltr mule-enterprise-standalone-4.2.0/conf/
CMD echo "------ Licence installed ! --------"

# Expose the necessary port ranges as required by the Mule Apps
EXPOSE      8081-8085
EXPOSE      9000
EXPOSE      9082

# Mule remote debugger
EXPOSE      5000

# Mule JMX port (must match Mule config file)
EXPOSE      1098

# Mule MMC agent port
EXPOSE      7777

# AMC agent port
EXPOSE      9997

# Start Mule runtime
CMD echo "--- Starting Mule runtime ---"
CMD         ["mule-enterprise-standalone-4.2.0/bin/mule"]

构建镜像没问题,但运行时报错:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "mule-enterprise-standalone-4.2.0/bin/mule": permission denied: unknown.

1 个答案:

答案 0 :(得分:0)

也许 unzip 命令没有保留文件属性,所以脚本的执行属性丢失了。或者,文件所有权可能不正确,并且它使用与安装的用户不同的用户执行。

作为旁注,MMC 与 Mule 4 不兼容,因此您可以删除该端口。