I am using the following section of my docker-compose.yml to add an s3 compatible service to my local development area:
minio:
image: minio/minio
container_name: experiments_minio
ports:
- '9000:9000'
- '9001:9001'
environment:
- MINIO_ACCESS_KEY=12345678
- MINIO_SECRET_KEY=password
command: server /data
When I run docker-compose up, minio is present in the list on active containers:
bb3b62a7a094 quiz_experiments_www "docker-php-entrypoi…" 4 hours ago Up 4 hours 0.0.0.0:81->80/tcp experiments_www
121520becb01 minio/minio "/usr/bin/docker-ent…" 4 hours ago Up 4 hours 0.0.0.0:9000-9001->9000-9001/tcp experiments_minio
94e7c9494226 adminer "entrypoint.sh docke…" 4 hours ago Up 4 hours 0.0.0.0:8080->8080/tcp experiments_adminer
ef012349a6ce mysql "docker-entrypoint.s…" 4 hours ago Up 4 hours 33060/tcp, 0.0.0.0:3307->3306/tcp experiments_db
My problem is when I visit localhost/9001, the browser switches the port portion of the url to some random numbers and I don't get the minio admin area.
The output from the commandline does mention using --console-address to set a static port or one will be assigned.
I can use the following code directly in the terminal to setup a minio container:
docker run \
-p 9000:9000 \
-p 9001:9001 \
minio/minio server /data --console-address ":9001"
But how can the --console-address flag (or some equivalent) be set in docker-compose ?