diff --git a/Development-Quickstart.md b/Development-Quickstart.md index 95fe81f..f2a0f17 100644 --- a/Development-Quickstart.md +++ b/Development-Quickstart.md @@ -83,4 +83,33 @@ npm run dev If your browser does not open automatically, visit http://0.0.0.0:3000/ and select the Monitor tab. Follow the steps for _Terminal 2_ in the backend section to send some messages into Inbucket and confirm they appear in your browser. -The development server features hot code loading, so most changes you make to the Elm code will not require a browser refresh to be visible. \ No newline at end of file +The development server features hot code loading, so most changes you make to the Elm code will not require a browser refresh to be visible. + +# Docker container build + +Build the container from the root `inbucket` directory: + +```sh +docker build . -t inbucket/inbucket:latest +``` + +The `Dockerfile` uses a multi-stage build, the first container installs all the Go and Elm dependencies and builds Inbucket. The output of the build is then copied to a minimal container. + +To test the docker container locally, you can use our helper script: + +```sh +etc/docker/docker-run.sh +``` + +which is equivalent to the following docker command: + +```sh +docker run -p 9000:9000 -p 2500:2500 -p 1100:1100 \ + -v /tmp/inbucket/config:/config \ + -v /tmp/inbucket/storage:/storage \ + inbucket/inbucket +``` + +This forwards the default HTTP (9000), SMTP (2500) and POP3 (1100) ports into the container, and maps the storage volumes into `/tmp/inbucket`. Using the same default ports means you can still run `etc/swaks-tests/run-tests.sh` to populate it with email. + +_Note:_ the log output from the Docker container defaults to a more verbose JSON format, this is intentional. \ No newline at end of file