Skip to content

Instantly share code, notes, and snippets.

@kotauchisunsun
Last active August 9, 2017 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kotauchisunsun/c59001a40d2750261ad38f2426782133 to your computer and use it in GitHub Desktop.
Save kotauchisunsun/c59001a40d2750261ad38f2426782133 to your computer and use it in GitHub Desktop.
コマンド1つで作れる!かんたん自宅Amazon S3互換環境! ref: http://qiita.com/kotauchisunsun/items/c870bb65cfa12edcce13
$ sudo apt-get install docker.io
$ sudo docker run --rm -p 8080:9000 -it \
-e MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE \
-e MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \
minio/minio server /export
$ sudo docker run --rm -p 8080:9000 -it -e MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE -e MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY minio/minio server /export
Created minio configuration file successfully at /root/.minio
Endpoint: http://172.17.0.2:9000 http://127.0.0.1:9000
AccessKey: AKIAIOSFODNN7EXAMPLE
SecretKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Browser Access:
http://172.17.0.2:9000 http://127.0.0.1:9000
Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide
$ mc config host add myminio http://172.17.0.2:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Object API (Amazon S3 compatible):
Go: https://docs.minio.io/docs/golang-client-quickstart-guide
Java: https://docs.minio.io/docs/java-client-quickstart-guide
Python: https://docs.minio.io/docs/python-client-quickstart-guide
JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide
.NET: https://docs.minio.io/docs/dotnet-client-quickstart-guide
Drive Capacity: 87 GiB Free, 96 GiB Total
$ sudo apt-get install python-pip
$ sudo pip install awscli
$ aws configure
AWS Access Key ID [****************MPLE]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [****************EKEY]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]:
Default output format [None]:
$ aws --endpoint-url http://localhost:8080 s3 ls
2017-07-23 17:17:04 miniotest
$ aws --endpoint-url http://localhost:8080 s3 mb s3://miniotest
make_bucket: miniotest
$ aws --endpoint-url http://localhost:8080 s3 rb s3://miniotest
remove_bucket: miniotest
$ aws --endpoint-url http://localhost:8080 s3 ls s3://miniotest
2017-07-23 17:19:00 0 testfile_from_local
$ aws --endpoint-url http://localhost:8080 s3 cp testfile s3://miniotest/testfile_from_local
upload: ./testfile to s3://miniotest/testfile_from_local
$ aws --endpoint-url http://localhost:8080 s3 cp s3://miniotest/testfile_from_local testfile_from_s3
download: s3://miniotest/testfile_from_local to ./testfile_from_s3
$ aws --endpoint-url http://localhost:8080 s3 rm s3://miniotest/testfile_from_local
delete: s3://miniotest/testfile_from_local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment