$ docker run --rm --name minio -p 9000:9000 -p 9001:9001 quay.io/minio/minio server /data --console-address ":9001"
$ docker exec -it minio bash
bash-5.1# mc config host add local http://localhost:9000 minioadmin minioadmin
bash-5.1# mc mb local/vuls
bash-5.1# mc anonymous set public local/vuls
run
$ cat config.toml
[aws]
s3Endpoint = "http://localhost:9000"
region = "us-east-1"
credentialProvider = "anonymous"
s3Bucket = "vuls"
s3UsePathStyle = true
$ vuls report --to-s3
$ docker exec -it minio bash
bash-5.1# mc ls local/vuls/2024-06-12T18:36:18+09:00/
[2024-06-17 09:25:32 UTC] 226B STANDARD pseudo_short.txt
Checklist:
You don't have to satisfy all of the following.
[ ] Write tests
[ ] Write documentation
[x] Check that there aren't other open pull requests for the same issue/feature
[x] Format your source code by make fmt
[x] Pass the test by make test
[x] Provide verification config / commands
[x] Enable "Allow edits from maintainers" for this PR
What did you implement:
The method currently used to configure S3 endpoints is deprecated. https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config#WithEndpointResolverWithOptions
Refer to the following to set up the S3 BaseEndpoint. https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/endpoints/
Type of change
How Has This Been Tested?
setup
run
Checklist:
You don't have to satisfy all of the following.
make fmt
make test
Is this ready for review?: YES
Reference