Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker verbose option #103

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion Dockerfile
@@ -1,3 +1,11 @@
FROM node:5-onbuild

ENV VERBOSE 0

EXPOSE 80 25
CMD ["bin/maildev", "--web", "80", "--smtp", "25"]

ADD entrypoint.sh /
RUN chmod u+x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

CMD ["sh", "-c", "bin/maildev --web 80 --smtp 25"]
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -14,6 +14,10 @@

If you want to use MailDev with [Docker](https://www.docker.com/), you can use the ['djfarrelly/maildev' image on Docker Hub](https://registry.hub.docker.com/u/djfarrelly/maildev/).

Docker environment options:

* `VERBOSE`: Set `--verbose` option. Default to `0`, `1` for activation.

For convenient use with Grunt, try [grunt-maildev](https://github.com/xavierpriour/grunt-maildev).

## Usage
Expand Down
11 changes: 11 additions & 0 deletions entrypoint.sh
@@ -0,0 +1,11 @@
#!/usr/bin/env sh

set -e

OPTS=""

if [ "${VERBOSE}" = 1 ]; then
OPTS="${OPTS} --verbose"
fi

exec "$@ ${OPTS}"