# I can not start apache using entry point

**URL:** <https://forums.docker.com/t/i-can-not-start-apache-using-entry-point/147758>\
**Category:** General\
**Created:** [April 18, 2025, 12:12am UTC](https://forums.docker.com/t/i-can-not-start-apache-using-entry-point/147758 "2025-04-18T00:12:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcabrerazuniga](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/jcabrerazuniga/32/57341_2.png) [@jcabrerazuniga](https://forums.docker.com/u/jcabrerazuniga)\
**Post date:** [April 18, 2025, 12:12am UTC](https://forums.docker.com/t/i-can-not-start-apache-using-entry-point/147758/1 "2025-04-18T00:12:05Z")

</div>

My Dockerfile content is:

```auto
FROM ubuntu:24.04
EXPOSE 80
EXPOSE 443

RUN \
  sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
  apt-get update && \
  apt-get -y upgrade && \
  apt-get install -y build-essential && \
  apt-get install -y software-properties-common && \
  apt-get install -y byobu curl git htop man unzip vim wget && \
  rm -rf /var/lib/apt/lists/*

# update the repository sources list
# and install dependencies
RUN apt-get update \
    && apt-get install -y curl \
    && apt-get -y autoclean

RUN mkdir /client_ssl

RUN apt-get install -y mc

RUN apt install mariadb-client -y

RUN apt install mysql-client -y

RUN apt-get install -y lynx # neede by mc F3

RUN apt-get install -y pkg-config #needed by watchman

RUN apt-get install -y wget

RUN apt-get install -y gpg-agent wget

RUN apt-get update

RUN apt install -y apache2

RUN apt install -y php libapache2-mod-php php-mysql

# ENTRYPOINT ["/usr/sbin/apache2ctl start"]

```

I had to comment the ENTRYPOINT one since docker build can not find the apache2ctl command. My goal is to have Apache running at the end of my Dockerfile…  
Any suggestions? Thanks in advance

---

<div class="post-metadata">

**Author:** ![cavo789](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/cavo789/32/61490_2.png) [@cavo789](https://forums.docker.com/u/cavo789)\
**Post date:** [April 18, 2025, 5:58am UTC](https://forums.docker.com/t/i-can-not-start-apache-using-entry-point/147758/2 "2025-04-18T05:58:42Z")

</div>

Hi

As a suggestion, a question : why did you use an Ubuntu image and not a httpd (apache) one ?

---

<div class="post-metadata">

**Author:** ![deanayalon](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/deanayalon/32/49113_2.png) [@deanayalon](https://forums.docker.com/u/deanayalon)\
**Post date:** [April 18, 2025, 6:29am UTC](https://forums.docker.com/t/i-can-not-start-apache-using-entry-point/147758/3 "2025-04-18T06:29:01Z")

</div>

Split your entrypoint to an array, first element. Will be the tool, second element will be “start”

Currently it looks for an executable named `/usr/sbin/apache2ctl start`

Also, you may want to have that “start” be in CMD rather than entrypoint

---

<div class="post-metadata">

**Author:** ![jcabrerazuniga](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/jcabrerazuniga/32/57341_2.png) [@jcabrerazuniga](https://forums.docker.com/u/jcabrerazuniga)\
**Post date:** [April 18, 2025, 1:20pm UTC](https://forums.docker.com/t/i-can-not-start-apache-using-entry-point/147758/4 "2025-04-18T13:20:25Z")

</div>

For Learning and controlling purposes. Also, as I recall the image you are referring to does not use Ubuntu. Thanks

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/docker/original/3X/d/4/d4fbccd46c81bfcffe9822e20e17736d946fa821.png) [@system](https://forums.docker.com/u/system)\
**Post date:** [May 18, 2025, 1:20pm UTC](https://forums.docker.com/t/i-can-not-start-apache-using-entry-point/147758/5 "2025-05-18T13:20:39Z")

</div>

Closed on May 18, 2025, 1:20pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
