Answer the question
In order to leave comments, you need to log in
How to configure Apache inside Docker?
I'm learning docker, let's say I want to experiment and just execute a script in docker. I have this Dockerfile:
FROM php:7.3-apache
WORKDIR /dockertest
COPY . .
RUN echo "$PWD" > testfile
EXPOSE 8080
Answer the question
In order to leave comments, you need to log in
Fit. When you start the container, mount the Apache config directory.
Example Start a container with a volume
PS
EXPOSE 8080 - does not forward a port to the system, it is an informational directive that tells the user which port the service in the container is listening on. You may not use it at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question