Docker image based on s3rver node package.
The aim of this project is to provide a lightweight Docker image for local S3 development. That's why it's not support all s3rver granular configuration options. Usually you need to specify only the list of buckets that will be created on startup and than you can use it for integration or e2e tests.
By default, s3rver assumes that it started on localhost:4569
and all buckets will be created with vhost-style access.
So you should assume that for the client configuration. See s3rver documentation for more details.
There are some options that you can pass to container via environment variables.
Container does not have any required options and will work with default values.
However, usually you need to specify at least BUCKETS
option.
All bucket data will be stored in /tmp/s3rver
directory inside container.
BUCKETS
- comma separated list of buckets that service will create on startupRESET_ON_CLOSE
- (false
by default) remove all bucket data on server closePORT
- (4569
by default) port to listenHOST
- (localhost
by default) host to listenVHOST_BUCKETS
- (true
by default) disable vhost-style access for all buckets
Note: You can pass boolean values as
false
ortrue
strings or as0
or1
,no
oryes
strings.
To get the latest container version run:
docker pull ghcr.io/clockwisesoftware/s3rver:latest
than you can run it with docker run
command or use docker-compose
file.
docker run -p 4569:4569 -e BUCKETS=users-profiles-pics,uploads ghcr.io/clockwisesoftware/s3rver:latest
version: '3.1'
services:
s3-local:
image: ghcr.io/clockwisesoftware/s3rver:latest
ports:
- "4569:4569"
environment:
- "BUCKETS=users-profiles-pics,uploads"
- "RESET_ON_CLOSE=0"
BUCKETS
- comma separated list of buckets that service will create on startupRESET_ON_CLOSE
- remove all bucket data on server close
If your client only supports signed requests, specify the credentials
{
accessKeyId: "S3RVER",
secretAccessKey: "S3RVER",
}
in your client's configuration.