1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/minio/README.md

91 lines
2.4 KiB
Markdown
Raw Normal View History

2017-10-03 06:33:31 +02:00
minio
=====
2021-12-01 12:11:40 +02:00
[Minio][1] offers high-performance, S3 compatible object storage.
Native to Kubernetes, MinIO is the only object storage suite available on
every public cloud, every Kubernetes distribution, the private cloud and the
edge. MinIO is software-defined and is 100% open source under GNU AGPL v3.
2017-10-03 06:33:31 +02:00
2017-10-03 07:08:11 +02:00
## Server
```bash
$ docker-compose up -d
2021-12-01 12:11:40 +02:00
$ curl http://127.0.0.1:9000
2017-10-03 07:08:11 +02:00
```
## Client
2017-10-03 06:33:31 +02:00
Download minio client:
- [linux/amd64][2]
2021-12-01 12:11:40 +02:00
- [linux/arm][3]
- [windows/arm64][4]
2017-10-03 06:33:31 +02:00
Read minio [tutorial][5].
```bash
2021-12-01 12:11:40 +02:00
$ mc alias set minio http://127.0.0.1:9000 XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
$ cat ~/.mc/config.json
2017-10-03 06:33:31 +02:00
$ mc mb minio/test
$ mc cp README.md minio/test
$ mc cat minio/test/README.md
$ mc ls -r minio
$ mc rm minio/test/README.md
$ mc rm minio/test
```
2017-10-03 07:08:11 +02:00
## Client (Android)
```bash
$ termux-setup-storage
$ realpath ~/storage/dcim
/storage/emulated/0/DCIM
$ cd ~/storage/dcim/Camera
$ termux-camera-photo -c 0 back.jpg
$ termux-camera-photo -c 1 front.jpg
$ go get -u github.com/minio/mc
2021-12-01 12:11:40 +02:00
$ mc alias set minio http://127.0.0.1:9000 XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
2017-10-03 07:08:11 +02:00
$ mc mb minio/android
$ mc mirror --force --remove --watch /storage/emulated/0/DCIM/Camera/ minio/android/camera
```
```bash
$ pwd
/data/data/com.termux/files/home
$ cat >> .bashrc << _EOF_
export TMPDIR=/data/data/com.termux/files/usr/tmp
export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
export RESTIC_REPOSITORY=s3:http://192.168.1.104:9000/android
export RESTIC_PASSWORD=ZZZZZZZZ
_EOF_
$ restic init
$ restic backup .bashrc
$ restic snapshots
ID Date Host Tags Directory
----------------------------------------------------------------------
8d6a4777 2017-10-03 04:54:39 localhost /data/data/com.termux/files/home/.bashrc
$ restic restore 8d6a4777 -t xxx
$ ls -al xxx
total 12
drwx------ 2 u0_a120 u0_a120 4096 Oct 3 12:59 .
drwx------ 14 u0_a120 u0_a120 4096 Oct 3 12:59 ..
-rw------- 1 u0_a120 u0_a120 406 Oct 3 12:53 .bashrc
$ rm -r xxx
```
2023-03-22 10:50:01 +02:00
## Server
[read more][6]
2017-10-03 06:33:31 +02:00
[1]: https://minio.io/
[2]: https://dl.minio.io/client/mc/release/linux-amd64/mc
2021-12-01 12:11:40 +02:00
[3]: https://dl.minio.io/client/mc/release/linux-arm/mc
[4]: https://dl.minio.io/client/mc/release/windows-amd64/mc
[5]: https://docs.min.io/docs/minio-client-complete-guide
2023-03-22 10:50:01 +02:00
[6]: https://min.io/docs/minio/linux/reference/minio-server/minio-server.html