New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't deploy on Docker Swarm #19610
Comments
What's the error log ? @asijoumi |
Hi @jiuker, I have this :
|
I think that's network issue. Not for minio. |
It seems strange that the exemple of the documentation won't work with Docker Swarm... Ok, do you have an exemple of deployment of minio with docker-compose ? |
You mentioned one could be ok. |
@jiuker, it is not woking ... I copied the docker-compose.yml from the documentation : version: '3.7'
# Settings and configurations that are common for all containers
x-minio-common: &minio-common
image: quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
expose:
- "9000"
- "9001"
# environment:
# MINIO_ROOT_USER: minioadmin
# MINIO_ROOT_PASSWORD: minioadmin
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
# starts 4 docker containers running minio server instances.
# using nginx reverse proxy, load balancing, you can access
# it through port 9000.
services:
minio1:
<<: *minio-common
hostname: minio1
volumes:
- data1-1:/data1
- data1-2:/data2
minio2:
<<: *minio-common
hostname: minio2
volumes:
- data2-1:/data1
- data2-2:/data2
minio3:
<<: *minio-common
hostname: minio3
volumes:
- data3-1:/data1
- data3-2:/data2
minio4:
<<: *minio-common
hostname: minio4
volumes:
- data4-1:/data1
- data4-2:/data2
nginx:
image: nginx:1.19.2-alpine
hostname: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
- "9001:9001"
depends_on:
- minio1
- minio2
- minio3
- minio4
## By default this config uses default local driver,
## For custom volumes replace with volume driver configuration.
volumes:
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2: Docker compose and Docker Swarm are not the same. So you do have an example for Docker Swarm ? |
You need to check your host. Like firework or others. |
It seems like something is wrong with your environment, since |
It's strange ... You can test this example : version: '3.7'
x-minio-common: &minio-common
image: quay.io/minio/minio:RELEASE.2024-04-18T19-09-19Z
command: server --console-address ":9001" http://minio_minio{1...4}/data
networks:
- minio
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
services:
minio1:
<<: *minio-common
volumes:
- minio1:/data
minio2:
<<: *minio-common
volumes:
- minio2:/data
minio3:
<<: *minio-common
volumes:
- minio3:/data
minio4:
<<: *minio-common
volumes:
- minio4:/data
nginx:
image: nginx:1.19.2-alpine
networks:
- minio
depends_on:
- minio1
- minio2
- minio3
- minio4
volumes:
minio1:
minio2:
minio3:
minio4:
networks:
minio:
driver: overlay
attachable: true After that run : docker run --rm -it --network=minio_minio node:18-alpine sh Then : apk add curl And : curl http://minio_nginx We got an answer from nginx .. It's the same docker stack. Docker was able to resolve the nginx domain name but not the minio ? |
The DNS issues are common in docker swarm. Use k8s with a kind cluster much easier and more robust. Docker is good at containers not at orchestration. |
NOTE
If this case is urgent, please subscribe to Subnet so that our 24/7 support team may help you faster.
Hi ! I used the docker-compose.yaml located on the documentation (https://github.com/minio/minio/blob/master/docs/orchestration/docker-compose/docker-compose.yaml) and change it a little bit. But I was unable to used it on docker swarm.
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce (for bugs)
docker-compose.yml
To easily test it, you can use https://labs.play-with-docker.com
Context
Regression
Your Environment
minio --version
):uname -a
):The text was updated successfully, but these errors were encountered: