6.8 KiB
1) Pull the Latest Stable Image of MinIO
2) Create the Environment Variable File
3) Create and Run the Container
Select the container management interface of your choice for the relevant command syntax.
Podman
Copy the command to a text file for further modification.
podman run -dt \
-p 9000:9000 -p 9090:9090 \
-v PATH1:/data-1 \
-v PATH2:/data-2 \
-v PATH3:/data-3 \
-v PATH4:/data-4 \
-v /etc/default/minio:/etc/config.env \
-e "MINIO_CONFIG_ENV_FILE=/etc/config.env" \
--name "minio_local" \
minio server --console-address ":9090"
Specify any other options <markdown/podman-run.1.html>
to
podman run
as necessary for your local environment.
Docker
Copy the command to a text file for further modification.
docker run -dt \
-p 9000:9000 -p 9090:9090 \
-v PATH1:/data-1 \
-v PATH2:/data-2 \
-v PATH3:/data-3 \
-v PATH4:/data-4 \
-v /etc/default/minio:/etc/config.env \
-e "MINIO_CONFIG_ENV_FILE=/etc/config.env" \
--name "minio_local" \
minio server --console-address ":9090"
Specify any other options
to docker run
as necessary for your local environment.
For running Docker in Rootless mode, you may need to set the following additional Docker CLI options:
- Linux
-
--user $(id -u):$(id -g)
- directs the container to run as the currently logged in user. - Windows
-
--security-opt "credentialspec=file://path/to/file.json"
- directs the container to run using a Windows Group Managed Service Account.
The following table describes each line of the command and provides additional configuration instructions:
Line | Description |
---|---|
podman run -dt docker run -dt |
Directs Podman/Docker to create and start the container as a
detached (-d ) background process with a pseudo-TTY
(-t ). This allows the container to run in the background
with an open TTY for bash-like access. |
-p 9000:9000 -p 9090:9090 |
Binds the ports 9000 and 9090 on the local
machine to the same ports on the container. This allows access to the
container through the local machine. |
|
Binds the storage volume
Include additional |
|
Mounts the environment file created in the previous step to the
The MinIO Server uses this environment file for configuration. |
-e "MINIO_CONFIG_ENV_FILE=/etc/config.env" |
Sets a MinIO environment variable pointing to the container-mounted path of the environment file. |
--name "minio_local" |
Sets a custom name for the container. Omit this value to allow Podman/Docker to automatically generate a container name. You can replace this value to best reflect your requirements. |
|
Starts the MinIO server using the If you modify this value, ensure you set the proper port mapping
using the |
4) Validate the Container Status
Status: 1 Online, 0 Offline.
API: http://10.0.2.100:9000 http://127.0.0.1:9000
RootUser: myminioadmin
RootPass: minio-secret-key-change-me
Console: http://10.0.2.100:9090 http://127.0.0.1:9090
RootUser: myminioadmin
RootPass: minio-secret-key-change-me
Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html
$ mc alias set myminio http://10.0.2.100:9000 myminioadmin minio-secret-key-change-me
Documentation: https://min.io/docs/minio/container/index.html
Container Networks May Not Be Accessible Outside of the Host
The API
and CONSOLE
blocks may include the
network interfaces for the container. Clients outside of the container
network cannot access the MinIO API or Console using these
addresses.
External access requires using a network address for the container
host machine and assumes the host firewall allows access to the related
ports (9000
and 9090
in the examples).