Create mc

This commit is contained in:
Stille 2022-02-07 21:36:52 +08:00
parent 2f1ed007c4
commit 48e7770547
2 changed files with 24 additions and 0 deletions

8
mc/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM alpine
LABEL maintainer="Stille <stille@ioiox.com>"
RUN if [ "$(uname -m)" = "x86_64" ]; then export PLATFORM=amd64 ; else if [ "$(uname -m)" = "aarch64" ]; then export PLATFORM=arm64 ; fi fi \
&& wget https://dl.minio.io/client/mc/release/linux-${PLATFORM}/mc -O /usr/local/bin/mc \
&& chmod +x /usr/local/bin/mc
CMD [ "/bin/sh" "-c" "mc" ]

16
mc/README.md Normal file
View File

@ -0,0 +1,16 @@
# mc
GitHub [stilleshan/dockerfiles](https://github.com/stilleshan/dockerfiles)
Docker [stilleshan/mc](https://hub.docker.com/r/stilleshan/mc)
> *docker image support for X86 and ARM*
## 简介
基于 [minio/mc](https://github.com/minio/mc) 项目的**执行** docker 镜像.
## 使用
参照示例,挂载数据目录.
```shell
docker run --rm \
-v /data/path:/data \
stilleshan/mc sh -c 'mc config host add minio https://minio.domain.com user password --api s3v4 && mc cp /data/foo.tar minio/buckets/path/'
```