Apache2 Image build using Dockerfile failed with http port as 8088

Hi,
I am trying to build the apache2 Image using Docker with http port as 8088. I submitted multiple times but still it says wrong. Can some one tell me what is wrong in the below Dockerfile?

FROM ubuntu:latest
RUN apt update
RUN apt install -y apache2
RUN apt install -y apache2-utils
EXPOSE :8088
CMD [“apache2ctl”, “-D”, “FOREGROUND”]

EXPOSE does not change the apache port. That is always 80 unless you modify the configuration files of apache before starting it.

This has to be set in 2 places:

/etc/apache2/ports.conf

and

/etc/apache2/sites-enabled/000-default.conf

Since it’s an image build, you have to use sed to change these files

See here for what needs to be edited.

Also there is no real need to make it serve on 8088 inside the container. Leave it as 80 and port map it

docker run -p 8088:80 your-image-name