Docker Community Forums

Share and learn in the Docker community.

Can't install postfix in my docker container

(Irfuel) #1

Here is the first part of my Docker file

FROM node:4

RUN rm /bin/sh && ln -s /bin/bash /bin/sh
ARG environment

ENV DEBIAN_FRONTEND noninteractive
RUN echo -e "deb jessie main\n \
deb-src jessie main\n \
deb jessie-updates main\n \
deb-src jessie-updates main\n \
deb jessie/updates main\n \
deb-src jessie/updates main\n \
" > /etc/apt/sources.list

RUN echo deb newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
RUN wget -O- | apt-key add -

RUN apt-get -y update

# new relic server monitor
RUN apt-get -y install newrelic-sysmond
RUN nrsysmond-config --set license_key=*****
RUN /etc/init.d/newrelic-sysmond start

RUN apt-get -y install telnet
RUN apt-get -y --force-yes install dpkg-dev debhelper

# mailer

RUN apt-get -y install postfix
RUN postconf -e "myhostname=***.***.com"
RUN postconf -e "relay_domains = ***.com"
RUN /etc/init.d/postfix start

For some reason postfix is not installed in the container. I get no errors and the container starts up correctly.
The only way to get it in there is by using docker exec -t -i *** /bin/bash once the container is running and doing the apt-get install postfix etc thing there, which obviously is not what I want.

Does anyone know why it doesn’t install?