1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-23 02:27:05 +00:00
mailinabox/containers/docker/Dockerfile

40 lines
1.4 KiB
Docker
Raw Normal View History

2014-04-25 16:39:14 +00:00
# Mail-in-a-Box Dockerfile
# see https://www.docker.io
###########################
# Change to this directory and then
# sudo docker.io build -t box .
# sudo docker.io run -i -t box
2014-05-02 13:35:21 +00:00
# Revert to phusion's baseimage once they upgrade to Ubuntu 14.04
#FROM phusion/baseimage:<version-based-on-14.04>
# For now use an upgraded image provided by pjz, based on his
# a PR: https://github.com/phusion/baseimage-docker/pull/64
FROM pjzz/phusion-baseimage:0.9.10
2014-04-25 16:39:14 +00:00
MAINTAINER Joshua Tauberer (http://razor.occams.info)
ENV PUBLIC_HOSTNAME box.local
# The PUBLIC_IP is only used for serving DNS, which means it is only
# useful if we set it to the host machine's IP address and have the
# host forward its port 53 (TCP/UDP) traffic to the docker container.
# Since we can't get the host's IP address here, we'll set this to
# a dummy value.
2014-05-02 13:35:21 +00:00
ENV PUBLIC_IP 127.0.122.123
2014-04-25 16:39:14 +00:00
2014-05-02 13:35:21 +00:00
# Turn off password-based authentication; for ssh access see the phusion-baseimage docs
RUN sed -i 's/^#\s*\(PasswordAuthentication no\)/\1/' /etc/ssh/sshd_config
2014-04-25 16:39:14 +00:00
2014-05-02 13:35:21 +00:00
# install some tools to install mailinabox
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -q -y git ca-certificates wget && apt-get clean
# actually install mailinabox
2014-04-25 16:39:14 +00:00
RUN git clone https://github.com/joshdata/mailinabox
2014-05-02 13:35:21 +00:00
RUN cd mailinabox && scripts/start.sh
# configure mailinabox services
ADD setup_services.sh /usr/local/bin/setup_services.sh
RUN bash /usr/local/bin/setup_services.sh
2014-04-25 16:39:14 +00:00
EXPOSE 22 25 53 443 587 993