docker run --rm \ --network YOUR_NETWORK_NAME \ python:3.11-slim \ sh -c ' pip install boto3 -q && python -c " import boto3 from botocore.config import Config s3 = boto3.client( \"s3\", endpoint_url=\"http://local-rustfs:9000\", aws_access_key_id=\"localrustfs\", aws_secret_access_key=\"localrustfs\", region_name=\"us-east-1\", config=Config( s3={\"addressing_style\": \"path\"}, signature_version=\"s3v4\" ) ) print(\"Buckets:\", s3.list_buckets()) s3.put_object( Bucket=\"sdih-local\", Key=\"test/hello.txt\", Body=b\"Hello from Docker network\" ) print(\"UPLOAD SUCCESSFUL\") " ' 
docker inspect -f \ '{{range $name, $config := .NetworkSettings.Networks}}{{println $name}}{{end}}' \ local-rustfs