Official httpd image, with git and cron to host site content from a Git repository.
450
This image extends the official httpd image, installs git and cron, and runs a cron job that updates site content from a Git repository into the httpd DocumentRoot.
Files:
Dockerfile — image definitionupdate_site.sh — script the cron job runs to clone/pull and copy site filesBuild (override repo/branch at build time if you like):
docker build --build-arg REPO=https://github.com/your/repo.git \
--build-arg BRANCH=main -t httpd-git .
Run (map host port 8080 to container port 80):
docker run --rm -p 8080:80 httpd-git
Override repository or branch at runtime by passing environment variables:
docker run --rm -e REPO_URL=https://github.com/your/repo.git -e BRANCH=main -p 8080:80 httpd-git
Manual update (run the update script directly inside the image):
docker run --rm --entrypoint /usr/local/bin/update_site.sh httpd-git
Cron schedule:
Dockerfile via CRON_SCHEDULE). To change the schedule, edit the Dockerfile before building or modify /etc/cron.d/update_site in a running container.Published under the MIT license.
Content type
Image
Digest
sha256:a134c056e…
Size
79.8 MB
Last updated
8 days ago
docker pull starwitorg/httpd-git:1.0.4