简体   繁体   English

Docker MinIO 入口点

[英]Docker MinIO entrypoint

I have this project which was initially set up on Mac, I'm on Windows, it's a Docker project which runs Node, Kafka and a few other containers, one of them being MinIO.我有这个项目,最初是在 Mac 上设置的,我在 Windows 上,它是一个 Docker 项目,它运行 Node、Kafka 和其他一些容器,其中一个是 MinIO。 Everything works as intended except MinIO, I get the following error:除 MinIO 外,一切都按预期工作,我收到以下错误:

createbuckets_1  | /bin/sh: nc: command not found

Entrypoint:入口点:

  /bin/sh -c "
  while ! nc -zv minio 9000; do echo 'Wait minio to startup...' && sleep 0.1; done; sleep 5;
  /usr/bin/mc config host add myminio http://minio:9000 X X;
  /usr/bin/mc rm -r --force myminio/cronify/details;
  /usr/bin/mc mb myminio/cronify/details;
  /usr/bin/mc policy set download myminio/cronify/details;
  exit 0;"

Where X is, credentials are supposed to be. X 在哪里,凭证应该在哪里。 I have been trying to find a fix for weeks.几个星期以来,我一直在努力寻找解决办法。

I have also tried to change the entrypoint from /bin/sh -c to /bin/bash -c or #!/bin/bash -c or #!/bin/sh -c , I get the same error except ".../bin/bash: nc: command not found" .我还尝试将入口点从/bin/sh -c更改为/bin/bash -c#!/bin/bash -c#!/bin/sh -c ,除了".../bin/bash: nc: command not found"

Dockerfile contains: Dockerfile 包含:

FROM confluentinc/cp-kafka-connect

I am not entirely sure what you are asking here, but if you are asking about the error message itself, it is telling you that nc is not installed (because it won't be in a container).我不完全确定你在这里问什么,但如果你问的是错误消息本身,它会告诉你nc没有安装(因为它不会在容器中)。 I am also not clear on which container minio is running in. Assuming the container is being pulled from minio/minio, then it will have curl installed, and you can just use the health check endpoint instead of trying to use nc - https://docs.min.io/minio/baremetal/monitoring/healthcheck-probe.html#minio-healthcheck-api .我也不清楚minio在哪个容器中运行。假设容器是从minio/minio中拉出来的,那么它将安装curl,你可以只使用健康检查端点而不是尝试使用nc - https:/ /docs.min.io/minio/baremetal/monitoring/healthcheck-probe.html#minio-healthcheck-api If it is not a minio container, you would just need to make sure it has curl installed (or nc if for some reason you were set on using that).如果它不是一个 minio 容器,你只需要确保它安装了 curl (或者nc如果由于某种原因你被设置为使用它)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM