You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Podman指定--entrypoint时crun报错:可执行文件未找到

Podman中使用--entrypoint执行MinIO客户端命令报错的问题

我正尝试在Podman中复现基于mlflow/minio的环境,该环境在VM中通过docker-compose可正常运行。但在Podman中,通过--entrypoint参数执行自动创建MinIO存储桶的脚本时,反复出现如下错误:
Error: crun: executable file [/bin/sh,-c,/create_bucket.sh] not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found

相关配置

create_bucket.sh脚本

#!/bin/sh
sleep 5;
/usr/bin/mc config host add mlflow_minio_storage http://mlflow_minio_storage:9000 "$MINIO_ACCESS_KEY" "$MINIO_SECRET_ACCESS_KEY" --api S3v4;
/usr/bin/mc ls mlflow_minio_storage | grep -q challenge || /usr/bin/mc mb mlflow_minio_storage/mlflow;
/usr/bin/mc policy download mlflow_minio_storage/mlflow;
exit 0;

Containerfile(Dockerfile)

FROM docker.io/minio/mc

COPY create_bucket.sh /create_bucket.sh
RUN chmod +x /create_bucket.sh

Podman运行命令

podman build -t minio_client:latest -f Containerfile
podman run \
--name=mlflow_minio_client \
--detach \
--secret=MINIO_ACCESS_KEY,type=env,target=MINIO_ACCESS_KEY \
--secret=MINIO_SECRET_ACCESS_KEY,type=env,target=MINIO_SECRET_ACCESS_KEY \
--net mlflow_net \
--network-alias mlflow_minio_client \
--restart always \
--requires mlflow_minio_storage \
--entrypoint ["/bin/sh","-c","/create_bucket.sh"] \
localhost/minio_client:latest

最小复现示例

即使是简化后的命令也会触发相同错误:

podman run \
--entrypoint ["/bin/sh","-c","/usr/bin/mc version"] \
docker.io/minio/mc:latest

对应的报错信息:
Error: crun: executable file [/bin/sh,-c,/usr/bin/mc version] not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found

疑问

我是否误解了--entrypoint的使用方式?

内容的提问来源于stack exchange,提问作者usdn

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 13:12:33