S
S
semki0962017-03-21 12:52:46
Apache HTTP Server
semki096, 2017-03-21 12:52:46

How to configure apache in Dockerfile?

I want to create an apache container. Googled an example dockerfile

FROM ubuntu:16.04
MAINTAINER [email protected]
RUN apt-get update && apt-get install -y openssh-server apache2 supervisor
RUN mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 22 80
CMD ["/usr/bin/supervisord"]

It seems to work, but I didn’t understand how to configure the Apache configuration in this image, for example, if I want to place sites in a different directory.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2017-03-21
@fox_12

As an option - mount a folder from the local system using VOLUME with the necessary Apache configs. It is possible not in the Dockerfile - but in docker-compose or immediately at startup - whichever way you prefer to run containers ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question