Emitir
Estou (desesperadamente) tentando replicar essa configuração mlflow/minio no podman: https://github.com/minio/blog-assets/blob/main/mlflow-minio-setup/docker-compose.yml . O tutorial roda bem em uma VM usando docker-compose.
No podman, no entanto, eu simplesmente não consigo descobrir como executar o script para criar automaticamente um bucket no minio. Eu tentei muitas combinações possíveis para a opção --entrypoint, mas sempre falha com: 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
...
Minha configuração
criar_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;
Arquivo Docker:
FROM docker.io/minio/mc
COPY create_bucket.sh /create_bucket.sh
RUN chmod +x /create_bucket.sh
podman executado:
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
Exemplo mínimo
Mesmo esse caso simples resulta no mesmo erro. Estou entendendo algo errado aqui?
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