An example of interaction with cloud object storage from 1cloud.ru using the Amazon S3 protocol, using C# and .NET 8.
S3_SERVICE_URL=https://1cloud.store
S3_ACCESS_KEY={YourAccessKey}
S3_SECRET_KEY={YourSecretKey}
Configure Environment variables at "environmentVariables"
section in file Properties/launchSettings.json
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"S3_SERVICE_URL": "https://1cloud.store",
"S3_ACCESS_KEY": "{YourDevAccessKey}",
"S3_SECRET_KEY": "{YourDevSecretKey}"
}
Container image repository | Last Build |
---|---|
ghcr.io/hackuna/one-cloud-s3-api |
Pull image command:
docker pull ghcr.io/hackuna/one-cloud-s3-api:latest
Run container command:
docker run -d \
--restart always \
--name storage-api \
-p 5000:8080 \
--volume=storage-secrets:/root/.aspnet/DataProtection-Keys \
--env=ASPNETCORE_ENVIRONMENT=Production \
--env=ASPNETCORE_URLS=http://+:8080 \
--env=S3_SERVICE_URL=https://1cloud.store \
--env=S3_ACCESS_KEY={YourAccessKey} \
--env=S3_SECRET_KEY={YourSecretKey} \
ghcr.io/hackuna/one-cloud-s3-api:latest
Stop container command:
docker stop storage-api
Remove container command:
docker rm storage-api