Browse Source

Support for http-path

pull/106/merge
Sam Hopwell 3 years ago
committed by Michael Bianco
parent
commit
0252da6221
  1. 6
      mailcatcher/Dockerfile
  2. 7
      mailcatcher/README.md

6
mailcatcher/Dockerfile

@ -9,13 +9,15 @@ RUN set -xe \
&& apk add --no-cache --virtual .build-deps \ && apk add --no-cache --virtual .build-deps \
build-base \ build-base \
sqlite-dev \ sqlite-dev \
&& gem install mailcatcher -v 0.6.5 --no-ri --no-rdoc \
&& gem install mailcatcher -v 0.8.0 --no-ri --no-rdoc \
&& apk del .build-deps && apk del .build-deps
ENV HTTPPATH="/"
# smtp port # smtp port
EXPOSE 1025 EXPOSE 1025
# webserver port # webserver port
EXPOSE 1080 EXPOSE 1080
CMD ["mailcatcher", "--no-quit", "--foreground", "--ip=0.0.0.0"]
CMD ["sh", "-c", "mailcatcher --no-quit --foreground --ip=0.0.0.0 --http-path $HTTPPATH"]

7
mailcatcher/README.md

@ -9,3 +9,10 @@ $ docker run -d -p 1080:1080 --name mailcatcher schickling/mailcatcher
``` ```
Link the container to another container and use the mailcatcher SMTP port `1025` via a ENV variable like `$MAILCATCHER_PORT_1025_TCP_ADDR`. Link the container to another container and use the mailcatcher SMTP port `1025` via a ENV variable like `$MAILCATCHER_PORT_1025_TCP_ADDR`.
## HTTP Path Support
You can run the web interface under a different root by specifying the environmental variable HTTPPATH. This can be used if you're proxying the incoming connection.
```sh
$ docker run -d -p 1080:1080 -e HTTPPATH="mailcatcher" --name mailcatcher schickling/mailcatcher
```
Loading…
Cancel
Save