I'm trying to start a service like Apache2 automatic inside a Docker container
My Dockerfile:
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get -y install apache2
ADD ./startup.sh /opt/startup.sh
RUN chmod +x /opt/startup.sh
CMD ["/bin/bash", "/opt/startup.sh"]
RUN /opt/startup.sh
My startup.sh:
#!/bin/bash
service apache2 start
But Apache2 isn't started automatic in the container.