ubuntu/apache2

Verified Publisher

By Canonical

Updated 3 days ago

Apache, a secure & extensible open-source HTTP server. Long-term tracks maintained by Canonical.

Image
Web servers
104

1M+

ubuntu/apache2 repository overview

ubuntu/apache2 is a rock for apache2 maintained by Canonical.

The Apache HTTP Server Project's goal is to build a secure, efficient, and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet.

[Learn more about apache2]

Tags and Architectures

NOTE: These tags follow a specific naming convention that respects the concept of channels.

TagsSupported untilVersionBaseArchitectures
2.4-24.04_beta05/20292.424.04amd64, s390x, ppc64le, arm64
2.4-22.04_beta06/20272.422.04amd64, ppc64le, s390x, arm64
2.4-26.04_edge05/20312.426.04amd64, s390x, arm64, ppc64le
2.4-24.04_edge05/20292.424.04amd64, s390x, ppc64le, arm64
2.4-22.04_edge06/20272.422.04amd64, ppc64le, s390x, arm64
View deprecated tags
TagsSupport ended onUpgrade Path
2.4-25.04_beta
aliases2.4-25.04_edge, edge, latest
01/2026 -
2.4-24.10_beta
aliases2.4-24.10_edge
07/2025 -
2.4-23.10_beta
aliases2.4-23.10_edge
07/2024 -
2.4-23.04_beta
aliases2.4-23.04_edge
01/2024 -
2.4-22.10_beta
aliases2.4-22.10_edge
07/2023 -
2.4-21.10_beta
aliases2.4-21.10_edge
07/2022 -
2.4-21.04_beta
aliases2.4-21.04_edge
01/2022 -
2.4-20.04_beta
aliases2.4-20.04_edge
05/2025 -

Get started

This rock's entrypoint is Pebble, a container-optimized init process that enables the orchestration of a collection of local service processes as an organized set.

[Learn more about Pebble]

Inspect

To view the Pebble services and checks defined in this rock:

docker run --rm ubuntu/apache2:2.4-25.04_beta plan
Run

To run this rock, use any of the usual container runtimes, for example, docker:

docker run --name apache2-container \
    -p 8080:80 \
    ubuntu/apache2:2.4-25.04_beta

Apache2 starts and serves HTTP traffic on port 80. Access the Apache2 server at http://localhost:8080.

Get logs

To view the logs of the running container, run:

docker exec apache2-container pebble logs

Or, for a specific service:

docker exec apache2-container pebble logs <service>
Monitor health checks

Rocks may have predefined health checks that you can list by running:

docker exec apache2-container pebble checks

The overall health of your container can be inspected via:

docker exec apache2-container pebble health

Deploy with Kubernetes

Works with any Kubernetes; if you don't have one, we recommend you install MicroK8s. Then, run microk8s.enable dns storage and snap alias microk8s.kubectl kubectl.

Download apache2.conf, index.html and apache2-deployment.yml and set containers.apache2.image in apache2-deployment.yml to your chosen channel tag (e.g. ubuntu/apache2:2.4-25.04_beta), then:

kubectl create configmap apache2-config --from-file=apache2=apache2.conf --from-file=apache2-site=index.html
kubectl apply -f apache2-deployment.yml

You will now be able to connect to the apache2 server on http://localhost:30080.

Configuration

Volumes
OptionDescriptionDefault
-v <path>:/var/www/html:roMount and serve a local website.None
-v <path>:/etc/apache2/apache2.conf:roLocal configuration file apache2.conf (try this example)None
Ports
OptionDescriptionDefault
-p <port>:80Expose port 80 on the host.None

[Report a bug] [Contribute]

Canonical is the provider of this container image. It is the user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within, as well as with Canonical’s IP Policy.

Tag summary

Content type

Image

Digest

sha256:635041759

Size

22.5 MB

Last updated

3 days ago

docker pull ubuntu/apache2:2.4-26.04_edge

This week's pulls

Pulls:

4,271

Last week