-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor Dockerfile to reduce number of layers
- Loading branch information
Showing
1 changed file
with
8 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,23 +4,17 @@ MAINTAINER Dietrich Rordorf <[email protected]> | |
|
||
USER root | ||
|
||
# exit on error | ||
RUN set -e | ||
|
||
# install ruby dependencies | ||
RUN apk add --no-cache ruby ruby-bigdecimal ruby-json libstdc++ sqlite-libs | ||
|
||
# install mailcatcher | ||
RUN apk add --no-cache --virtual .build-deps ruby-dev make g++ sqlite-dev | ||
RUN gem install mailcatcher --no-ri --no-rdoc | ||
# set exit on error flag, install ruby deps, build mailcatcher, remove buold deps | ||
RUN set -e && \ | ||
apk add --no-cache ruby ruby-bigdecimal ruby-json libstdc++ sqlite-libs && \ | ||
apk add --no-cache --virtual .build-deps ruby-dev make g++ sqlite-dev && \ | ||
gem install mailcatcher --no-ri --no-rdoc && \ | ||
apk del .build-deps && \ | ||
rm -rf /tmp/* /var/tmp/* | ||
|
||
# expose ports | ||
EXPOSE 1025 | ||
EXPOSE 1080 | ||
|
||
# remove no longer needed packages | ||
RUN apk del .build-deps | ||
RUN rm -rf /tmp/* /var/tmp/* | ||
|
||
# run process | ||
# entrypoint: run mailcatcher process | ||
CMD ["mailcatcher", "-f", "--ip=0.0.0.0"] |