mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-18 18:07:22 +01:00
simplify dockerization
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -35,18 +35,20 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
||||
# Install packages needed by Mail-in-a-Box.
|
||||
ADD containers/docker/apt_package_list.txt /tmp/mailinabox_apt_package_list.txt
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y $(cat /tmp/mailinabox_apt_package_list.txt)
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y rsyslog
|
||||
RUN rm -f /tmp/mailinabox_apt_package_list.txt
|
||||
RUN apt-get clean
|
||||
|
||||
# Create the user-data user, so the start script doesn't have to.
|
||||
RUN useradd -m user-data
|
||||
RUN rm -rf /etc/service/syslog-ng
|
||||
|
||||
# Now add Mail-in-a-Box to the system.
|
||||
ADD . /usr/local/mailinabox
|
||||
|
||||
#RUN /usr/local/mailinabox/containers/docker/setup.sh
|
||||
|
||||
# We can't know things like the IP address where the container will eventually
|
||||
# be deployed until the container is started. We also don't want to create any
|
||||
# private keys during the creation of the image --- that should wait until the
|
||||
# container is started too. So our whole setup process is deferred until the
|
||||
# container is started.
|
||||
ENTRYPOINT /usr/local/mailinabox/containers/docker/init.sh
|
||||
RUN mkdir -p /etc/my_init.d
|
||||
RUN ln -s /usr/local/mailinabox/containers/docker/init.sh /etc/my_init.d/20-mailinabox.sh
|
||||
|
||||
Reference in New Issue
Block a user