dev-container/README.md
Docker container for running Mountpoint S3 tests on Linux. Useful for macOS users to test against a Linux kernel/OS.
The container uses runtime builds with persistent caching:
~/.rustup/), cargo dependencies, and build artifacts are cached in Docker volumes between runsrust-toolchain.toml) is installedPopulate a .env file with environment variables required for the tests.
The script will automatically set the variables in the container.
For example (some entries omitted for brevity):
# .env
S3_BUCKET_NAME=amzn-s3-demo-bucket
S3_REGION=us-east-1
S3_SUBSESSION_IAM_ROLE=arn:aws:iam::111122223333:role/Mountpoint-Dev-SubSessionIamRole
S3_BUCKET_TEST_PREFIX=github-actions-tmp/
AWS_PROFILE=dev-container
Then use the script to interact with the container as below.
# Build and run the container
./dev-container/dev.py build
# Interactive shell
./dev-container/dev.py run
# Run a command (use -- to separate script args from container args), environment is auto populated from .env file
./dev-container/dev.py run --use-credentials-from-aws-config -- cargo nextest run --features s3_tests,fuse_tests -p mountpoint-s3-fs
# Find help information for all the options available
./dev-container/dev.py --help
You'll need to configure AWS credentials if you want to run things like the integration tests which access S3.
As an example, you might have credentials available in your ~/.aws/ folder.
You can use the --use-credentials-from-aws-config option to bind mount that directory into the container.
You may even want to configure an AWS profile which you use inside the container.
In this case, you may have credentials inside ~/.aws/credentials and then add AWS_PROFILE to your dotenv file.
See --help for more available arguments.
Rebuild the image when:
You do not need to rebuild when:
rust-toolchain.toml (the entrypoint installs the correct toolchain automatically)To remove resources like Docker volumes (e.g., when old toolchains accumulate):
./dev-container/dev.py clean