MinIO is an open-source, high-performance, distributed object storage system designed to store unstructured data, such as photos, videos, log files, backups, and container images.
This tutorial explains how to install MinIO inside a Docker container on Linux. Commands have been tested on Ubuntu.
Prepare environment
Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.
Install MinIO
- Host network
Run the following command to create a container for MinIO that uses host network:
docker run -d --name=minio --restart=always --network=host \
-v /opt/minio/data:/data \
-e MINIO_ROOT_USER=root \
-e MINIO_ROOT_PASSWORD=pwd12345 \
minio/minio server /data --console-address ":9001"
- User-defined bridge network
User-defined bridge network can be used for listening on different port. By default, the MinIO service listens on port 9000 for API requests and on port 9001 for the web UI. These ports can be changed with -p
option.
docker network create app-net
docker run -d --name=minio --restart=always --network=app-net \
-p 8080:9000 \
-p 8081:9001 \
-v /opt/minio/data:/data \
-e MINIO_ROOT_USER=root \
-e MINIO_ROOT_PASSWORD=pwd12345 \
minio/minio server /data --console-address ":9001"
Note: don't forget to change root password.
Testing MinIO
Open a web browser and go to http://<IP_ADDRESS>:9001
, where <IP_ADDRESS>
is the IP address of the system. Log in to the web UI with the username and password.
To test MinIO API availability, the following command can be used:
wget -Sq http://<IP_ADDRESS>:9000/minio/health/live
Replace <IP_ADDRESS>
with system's IP address. A 200 OK response code confirms that the MinIO API is online and operational.
Uninstall MinIO
To completely remove MinIO, remove its container:
docker rm --force minio
Remove MinIO image:
docker rmi minio/minio
You can also remove MinIO data:
sudo rm -rf /opt/minio
If a user-defined bridge network was created, you can delete it as follows:
docker network rm app-net
Leave a Comment
Cancel reply