Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Latest commit

 

History

History
59 lines (44 loc) · 1.77 KB

README.md

File metadata and controls

59 lines (44 loc) · 1.77 KB

moto_s3

Docker Automated build

A docker image using Moto in Stand-alone Server Mode, to provide a Python based implementation of Amazon S3. This can then be used in development and testing.

Built on the python:3.8-alpine library image from Docker Hub.

Supports passing options (with the exception of service) to moto_server (also see the Moto docs:

$ docker run countingup/moto_s3 --help

usage: moto_server [-h] [-H HOST] [-p PORT] [-r] [-s] [-c SSL_CERT]
                   [-k SSL_KEY]
                   [service]

positional arguments:
  service

optional arguments:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  Which host to bind
  -p PORT, --port PORT  Port number to use for connection
  -r, --reload          Reload server on a file change
  -s, --ssl             Enable SSL encrypted connection with auto-generated
                        certificate (use https://... URL)
  -c SSL_CERT, --ssl-cert SSL_CERT
                        Path to SSL certificate
  -k SSL_KEY, --ssl-key SSL_KEY
                        Path to SSL private key

Build locally

$ cd docker-moto_s3
$ docker build -t countingup/moto_s3 .

Run (will pull from dockerhub)

# Default
$ docker run -d -p 4567:4567 countingup/moto_s3

# With additional options
$ docker run -d -p 4567:4567 countingup/moto_s3 --reload

Usage in Docker Compose

moto_s3:
  image: countingup/moto_s3
  ports:
    # container port should be 4567
    - "4567:4567"