2

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.

HarisH Sharma
  • 1,101
  • 1
  • 11
  • 38

2 Answers2

5

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.

itiic
  • 3,284
  • 4
  • 20
  • 31
  • Yes it is working, but `docker run minio/minio version` this command create new docker container every time it runs, I dont need this, actually my minio is running on production, i dont want to make experiment there, – HarisH Sharma Apr 21 '17 at 12:34
  • You can run `docker run --rm minio/minio version` it would delete the exited container. – Harshavardhana May 14 '17 at 07:20
  • 2
    As of 2020, it seems that `docker run minio/minio version` should be replaced with `docker run minio/minio --version` otherwise you get an error message: _'version' is not a minio sub-command._ – maxime.bochon Oct 21 '20 at 12:44
  • @maxime.bochon you're right, now `docker run minio/minio --version` works – itiic Oct 21 '20 at 13:16
1

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.

Maxence
  • 2,029
  • 4
  • 18
  • 37