'How to get minio-server version in docker?

By using minio server in docker, i installed and started using it before couple of months ago, now i need to know what version of minio server i am using.

Also want to know how to update existing minio server to latest version, without losing my data?

here: Ubuntu version is 16.04 and docker version is 1.13.0.



Solution 1:[1]

To show version use:

docker run minio/minio version

EDIT 2020: To show version use:

docker run minio/minio --version

To get latest image of minio, use:

docker pull minio/minio

When it comes to volumes and data it depends on how you stared container

If

docker run -d -p 9000:9000 -v /my/local/path:/export minio/minio server /export 

so you have data in you local (host) path /my local/path

And you can do with container whatever you want

If not I'm not sure whether docker pull destroy your data or not. So I recommend you to copy data from container

docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-

before you do get started.

Solution 2:[2]

find the docker container name with

sudo docker ps

then you can

sudo docker inspect <container name> | grep "version"

or

sudo docker exec -it <container name> minio --version

It doesn't create a new container this way.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Maxence