├── .gitlab-ci.yml ├── .gitlab ├── .gitkeep └── dependabot.yml ├── README.md ├── alpine-caddy-aarch64 ├── Dockerfile └── files │ ├── Caddyfile │ └── index.html ├── alpine-caddy-amd64 ├── Dockerfile └── files │ ├── Caddyfile │ └── index.html ├── alpine-caddy-armhf ├── Dockerfile └── files │ ├── Caddyfile │ └── index.html ├── alpine-caddy-php-aarch64 ├── Dockerfile └── files │ ├── Caddyfile │ └── index.php ├── alpine-caddy-php-amd64 ├── Dockerfile └── files │ ├── Caddyfile │ └── index.php └── alpine-caddy-php-armhf ├── Dockerfile └── files ├── Caddyfile └── index.php /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # You can override the included template(s) by including variable overrides 2 | # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings 3 | # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings 4 | # Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings 5 | # Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings 6 | # Note that environment variables can be set in several places 7 | # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence 8 | stages: 9 | - build 10 | - test 11 | - deploy 12 | - manifest 13 | 14 | include: 15 | - remote: https://gitlab.com/yobasystems/gitlab-ci-templates/raw/master/container_scanning_all_arch.yml 16 | - template: Security/Secret-Detection.gitlab-ci.yml 17 | - template: Security/SAST.gitlab-ci.yml 18 | 19 | .build_template: &build_definition 20 | image: yobasystems/alpine-docker:dind 21 | stage: build 22 | script: 23 | - echo "Build Timestamp ${CI_COMMIT_TIMESTAMP} - ${CI_COMMIT_SHORT_SHA}" 24 | - echo "Building for ARCH=${ARCH}, PLATFORM=${PLATFORM}" 25 | - apk add --update git 26 | - cd alpine-caddy-${ARCH}/ 27 | - docker build 28 | --build-arg VCS_REF=${CI_COMMIT_SHORT_SHA} 29 | --build-arg BUILD_DATE=${CI_COMMIT_TIMESTAMP} 30 | -t ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} 31 | --platform linux/${PLATFORM} 32 | . 33 | - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token "$CI_REGISTRY" --password-stdin 34 | - docker push ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} 35 | 36 | amd64 caddy build: 37 | <<: *build_definition 38 | tags: 39 | - amd64 40 | variables: 41 | ARCH: amd64 42 | PLATFORM: amd64 43 | 44 | arm32v7 caddy build: 45 | <<: *build_definition 46 | tags: 47 | - armhf 48 | variables: 49 | ARCH: armhf 50 | PLATFORM: arm/v7 51 | 52 | arm64v8 caddy build: 53 | <<: *build_definition 54 | tags: 55 | - aarch64 56 | variables: 57 | ARCH: aarch64 58 | PLATFORM: arm64/v8 59 | 60 | sast: 61 | stage: test 62 | 63 | .deploy_template: &deploy_definition 64 | image: yobasystems/alpine-docker:dind 65 | stage: deploy 66 | rules: 67 | - if: $CI_COMMIT_TAG 68 | - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH 69 | script: 70 | - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token "$CI_REGISTRY" --password-stdin 71 | - echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin 72 | - echo "$QUAY_PASSWORD" | docker login -u "$QUAY_USERNAME" quay.io --password-stdin 73 | - echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USERNAME" --password-stdin 74 | - docker pull ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} 75 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $CI_REGISTRY_IMAGE:${ARCH} 76 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $DOCKER_REGISTRY_DOCKERHUB_REPO:${ARCH} 77 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} quay.io/$DOCKER_REGISTRY_QUAY_REPO:${ARCH} 78 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${ARCH} 79 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $CI_REGISTRY_IMAGE:${ARCH2} 80 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $DOCKER_REGISTRY_DOCKERHUB_REPO:${ARCH2} 81 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} quay.io/$DOCKER_REGISTRY_QUAY_REPO:${ARCH2} 82 | - docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${ARCH2} 83 | - docker push $CI_REGISTRY_IMAGE:${ARCH} 84 | - docker push $DOCKER_REGISTRY_DOCKERHUB_REPO:${ARCH} 85 | - docker push quay.io/$DOCKER_REGISTRY_QUAY_REPO:${ARCH} 86 | - docker push ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${ARCH} 87 | - docker push $CI_REGISTRY_IMAGE:${ARCH2} 88 | - docker push $DOCKER_REGISTRY_DOCKERHUB_REPO:${ARCH2} 89 | - docker push quay.io/$DOCKER_REGISTRY_QUAY_REPO:${ARCH2} 90 | - docker push ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${ARCH2} 91 | - | 92 | if [[ "$CI_COMMIT_TAG" ]]; then 93 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG}-${ARCH} 94 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $DOCKER_REGISTRY_DOCKERHUB_REPO:${CI_COMMIT_TAG}-${ARCH} 95 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} quay.io/$DOCKER_REGISTRY_QUAY_REPO:${CI_COMMIT_TAG}-${ARCH} 96 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${CI_COMMIT_TAG}-${ARCH} 97 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG}-${ARCH2} 98 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} $DOCKER_REGISTRY_DOCKERHUB_REPO:${CI_COMMIT_TAG}-${ARCH2} 99 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} quay.io/$DOCKER_REGISTRY_QUAY_REPO:${CI_COMMIT_TAG}-${ARCH2} 100 | docker tag ${CI_REGISTRY_IMAGE}/${CI_COMMIT_SHORT_SHA}:${ARCH} ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${CI_COMMIT_TAG}-${ARCH2} 101 | docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG}-${ARCH} 102 | docker push $DOCKER_REGISTRY_DOCKERHUB_REPO:${CI_COMMIT_TAG}-${ARCH} 103 | docker push quay.io/$DOCKER_REGISTRY_QUAY_REPO:${CI_COMMIT_TAG}-${ARCH} 104 | docker push ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${CI_COMMIT_TAG}-${ARCH} 105 | docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG}-${ARCH2} 106 | docker push $DOCKER_REGISTRY_DOCKERHUB_REPO:${CI_COMMIT_TAG}-${ARCH2} 107 | docker push quay.io/$DOCKER_REGISTRY_QUAY_REPO:${CI_COMMIT_TAG}-${ARCH2} 108 | docker push ghcr.io/$DOCKER_REGISTRY_GHCR_REPO:${CI_COMMIT_TAG}-${ARCH2} 109 | fi 110 | 111 | amd64 caddy deploy: 112 | <<: *deploy_definition 113 | tags: 114 | - amd64 115 | variables: 116 | ARCH: amd64 117 | ARCH2: x86_64 118 | PLATFORM: amd64 119 | needs: 120 | - amd64 caddy build 121 | 122 | arm32v7 caddy deploy: 123 | <<: *deploy_definition 124 | tags: 125 | - armhf 126 | variables: 127 | ARCH: armhf 128 | ARCH2: arm32v7 129 | PLATFORM: arm/v7 130 | needs: 131 | - arm32v7 caddy build 132 | 133 | arm64v8 caddy deploy: 134 | <<: *deploy_definition 135 | tags: 136 | - aarch64 137 | variables: 138 | ARCH: aarch64 139 | ARCH2: arm64v8 140 | PLATFORM: arm64/v8 141 | needs: 142 | - arm64v8 caddy build 143 | 144 | manifest creation latest: 145 | image: yobasystems/alpine-docker:dind 146 | stage: manifest 147 | needs: 148 | - amd64 caddy deploy 149 | - arm32v7 caddy deploy 150 | - arm64v8 caddy deploy 151 | rules: 152 | - if: $CI_COMMIT_TAG 153 | - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH 154 | script: 155 | - mkdir -p ~/.docker 156 | - echo '{"experimental":"enabled"}' > ~/.docker/config.json 157 | - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token "$CI_REGISTRY" --password-stdin 158 | - echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin 159 | - echo "$QUAY_PASSWORD" | docker login -u "$QUAY_USERNAME" quay.io --password-stdin 160 | - echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USERNAME" --password-stdin 161 | - | 162 | create_and_push_manifest() { 163 | repo=$1 164 | tag=$2 165 | docker manifest create $repo:$tag \ 166 | $repo:amd64 \ 167 | $repo:armhf \ 168 | $repo:aarch64 169 | docker manifest annotate $repo:$tag $repo:amd64 --os linux --arch amd64 170 | docker manifest annotate $repo:$tag $repo:armhf --os linux --arch arm --variant v7 171 | docker manifest annotate $repo:$tag $repo:aarch64 --os linux --arch arm64 --variant v8 172 | docker manifest push $repo:$tag 173 | } 174 | - | 175 | for repo in $CI_REGISTRY_IMAGE $DOCKER_REGISTRY_DOCKERHUB_REPO quay.io/$DOCKER_REGISTRY_QUAY_REPO ghcr.io/$DOCKER_REGISTRY_GHCR_REPO; do 176 | create_and_push_manifest $repo latest 177 | done 178 | 179 | manifest creation version: 180 | image: yobasystems/alpine-docker:dind 181 | stage: manifest 182 | needs: 183 | - manifest creation latest 184 | rules: 185 | - if: $CI_COMMIT_TAG 186 | script: 187 | - mkdir -p ~/.docker 188 | - echo '{"experimental":"enabled"}' > ~/.docker/config.json 189 | - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token "$CI_REGISTRY" --password-stdin 190 | - echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin 191 | - echo "$QUAY_PASSWORD" | docker login -u "$QUAY_USERNAME" quay.io --password-stdin 192 | - echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USERNAME" --password-stdin 193 | - | 194 | create_and_push_manifest() { 195 | repo=$1 196 | tag=$2 197 | docker manifest create $repo:$tag --amend \ 198 | $repo:amd64 \ 199 | $repo:armhf \ 200 | $repo:aarch64 201 | docker manifest annotate $repo:$tag $repo:amd64 --os linux --arch amd64 202 | docker manifest annotate $repo:$tag $repo:armhf --os linux --arch arm --variant v7 203 | docker manifest annotate $repo:$tag $repo:aarch64 --os linux --arch arm64 --variant v8 204 | docker manifest push $repo:$tag 205 | } 206 | - echo "Processing tag $CI_COMMIT_TAG" 207 | - VERSION=$(echo $CI_COMMIT_TAG | cut -d- -f1) 208 | - MAJOR=$(echo $VERSION | cut -d. -f1) 209 | - MINOR=$(echo $VERSION | cut -d. -f2) 210 | - PATCH=$(echo $VERSION | cut -d. -f3) 211 | - | 212 | for repo in $CI_REGISTRY_IMAGE $DOCKER_REGISTRY_DOCKERHUB_REPO quay.io/$DOCKER_REGISTRY_QUAY_REPO ghcr.io/$DOCKER_REGISTRY_GHCR_REPO; do 213 | create_and_push_manifest $repo $CI_COMMIT_TAG 214 | create_and_push_manifest $repo $MAJOR 215 | create_and_push_manifest $repo $MAJOR.$MINOR 216 | create_and_push_manifest $repo $MAJOR.$MINOR.$PATCH 217 | done 218 | -------------------------------------------------------------------------------- /.gitlab/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yobasystems/alpine-caddy/bf57ff0287483a7fd1ef6c64283da0b221a9d74a/.gitlab/.gitkeep -------------------------------------------------------------------------------- /.gitlab/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: docker 4 | directory: /alpine-caddy-amd64/ 5 | schedule: 6 | interval: weekly 7 | - package-ecosystem: docker 8 | directory: /alpine-caddy-armhf/ 9 | schedule: 10 | interval: weekly 11 | - package-ecosystem: docker 12 | directory: /alpine-caddy-aarch64/ 13 | schedule: 14 | interval: weekly 15 | - package-ecosystem: docker 16 | directory: /alpine-caddy-php-amd64/ 17 | schedule: 18 | interval: weekly 19 | - package-ecosystem: docker 20 | directory: /alpine-caddy-php-armhf/ 21 | schedule: 22 | interval: weekly 23 | - package-ecosystem: docker 24 | directory: /alpine-caddy-php-aarch64/ 25 | schedule: 26 | interval: weekly -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Caddy container image running on Alpine Linux 2 | 3 | [![Docker Automated build](https://img.shields.io/docker/automated/yobasystems/alpine-caddy.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/yobasystems/alpine-caddy/) 4 | [![Docker Pulls](https://img.shields.io/docker/pulls/yobasystems/alpine-caddy.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/yobasystems/alpine-caddy/) 5 | [![Docker Stars](https://img.shields.io/docker/stars/yobasystems/alpine-caddy.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/yobasystems/alpine-caddy/) 6 | 7 | [![Alpine Version](https://img.shields.io/badge/Alpine%20version-v3.21.3-green.svg?style=for-the-badge)](https://alpinelinux.org/) 8 | [![Caddy Version](https://img.shields.io/badge/Caddy%20version-v2.9.1-green.svg?style=for-the-badge)](https://caddyserver.com/) 9 | 10 | 11 | This container image [(yobasystems/alpine-caddy)](https://hub.docker.com/r/yobasystems/alpine-caddy/) is based on the minimal [Alpine Linux](https://alpinelinux.org/) using the [Caddy](https://caddyserver.com/) HTTP/2 web server with HTTPS. 12 | 13 | ### Alpine Version 3.21.3 (Released 2025-02-13) 14 | ##### Caddy Version 2.9.1 15 | 16 | ---- 17 | 18 | ## Table of Contents 19 | 20 | - [What is Alpine Linux?](#what-is-alpine-linux) 21 | - [Features](#features) 22 | - [Architectures](#architectures) 23 | - [Tags](#tags) 24 | - [Layers & Sizes](#layers--sizes) 25 | - [How to use this image](#how-to-use-this-image) 26 | - [Image contents & Vulnerability analysis](#image-contents--vulnerability-analysis) 27 | - [Source Repositories](#source-repositories) 28 | - [Container Registries](#container-registries) 29 | - [Links](#links) 30 | - [Donation](#donation) 31 | 32 | 33 | ## 🏔️ What is Alpine Linux? 34 | Alpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications. Read more about Alpine Linux here and you can see how their mantra fits in right at home with Container images. 35 | 36 | ## What is Caddy? 37 | Caddy, sometimes clarified as the Caddy web server, is an open source, HTTP/2-enabled web server written in Go. It uses the Go standard library for its HTTP functionality. One of Caddy's most notable features is enabling HTTPS by default. 38 | 39 | ## ✨ Features 40 | 41 | * Minimal size only, minimal layers 42 | * Memory usage is minimal on a simple install. 43 | * Auto git clone from repo with `yobasystems/alpine-nginx:git` tag 44 | 45 | ## 🏗️ Architectures 46 | 47 | * ```:amd64```, ```:x86_64``` - 64 bit Intel/AMD (x86_64/amd64) 48 | * ```:arm64v8```, ```:aarch64``` - 64 bit ARM (ARMv8/aarch64) 49 | * ```:arm32v7```, ```:armhf``` - 32 bit ARM (ARMv7/armhf) 50 | 51 | #### 📝 PLEASE CHECK TAGS BELOW FOR SUPPORTED ARCHITECTURES, THE ABOVE IS A LIST OF EXPLANATION 52 | 53 | ## 🏷️ Tags 54 | 55 | * ```:latest``` latest branch based (Automatic Architecture Selection) 56 | * ```:php``` latest branch with php 57 | * ```:amd64```, ```:x86_64``` amd64 based on latest tag but amd64 architecture 58 | * ```:php-amd64```, ```:php-x86_64``` amd64 based on latest tag but amd64 architecture and includes php 59 | * ```:aarch64```, ```:arm64v8``` Armv8 based on latest tag but arm64 architecture 60 | * ```:php-aarch64```, ```:php-arm64v8``` Armv8 based on latest tag but arm64 architecture and includes php 61 | * ```:armhf```, ```:arm32v7``` Armv7 based on latest tag but arm architecture 62 | * ```:php-armhf```, ```:php-arm32v7``` Armv7 based on latest tag but arm architecture and includes php 63 | 64 | ## 📏 Layers & Sizes 65 | 66 | ![Version](https://img.shields.io/badge/version-amd64-blue.svg?style=for-the-badge) 67 | ![MicroBadger Layers (tag)](https://img.shields.io/docker/layers/yobasystems/alpine-caddy/amd64.svg?style=for-the-badge) 68 | ![MicroBadger Size (tag)](https://img.shields.io/docker/image-size/yobasystems/alpine-caddy/amd64.svg?style=for-the-badge) 69 | 70 | ![Version](https://img.shields.io/badge/version-aarch64-blue.svg?style=for-the-badge) 71 | ![MicroBadger Layers (tag)](https://img.shields.io/docker/layers/yobasystems/alpine-caddy/aarch64.svg?style=for-the-badge) 72 | ![MicroBadger Size (tag)](https://img.shields.io/docker/image-size/yobasystems/alpine-caddy/aarch64.svg?style=for-the-badge) 73 | 74 | ![Version](https://img.shields.io/badge/version-armhf-blue.svg?style=for-the-badge) 75 | ![MicroBadger Layers (tag)](https://img.shields.io/docker/layers/yobasystems/alpine-caddy/armhf.svg?style=for-the-badge) 76 | ![MicroBadger Size (tag)](https://img.shields.io/docker/image-size/yobasystems/alpine-caddy/armhf.svg?style=for-the-badge) 77 | 78 | ## 🚀 How to use this image 79 | ## Environment Variables: 80 | 81 | ### Main Caddy parameters: 82 | * `URL`: specify the url with http:// or https:// 83 | 84 | ## Creating an instance 85 | 86 | ```sh 87 | $ docker run -d --name examplecaddy -p 2015:2015 yobasystems/alpine-caddy 88 | ``` 89 | 90 | Point your browser to `http://host-ip:2015`. 91 | 92 | ### PHP 93 | `:[-]php` variant of this image bundles PHP-FPM. e.g. `:php`, `:0.11.0-php` 94 | ```sh 95 | $ docker run -d --name examplecaddy -p 2015:2015 yobasystems/alpine-caddy:php 96 | ``` 97 | Point your browser to `http://host-ip:2015` and you will see a php info page. 98 | 99 | ##### Local php source 100 | 101 | Replace `/path/to/php/src` with your php sources directory. 102 | ```sh 103 | $ docker run -d --name examplecaddy -v /path/to/php/src:/srv -p 2015:2015 yobasystems/alpine-caddy:php 104 | ``` 105 | Point your browser to `http://host-ip:2015`. 106 | 107 | ##### Note 108 | Your `Caddyfile` must include the line `startup php-fpm`. For Caddy to be PID 1 in the container, php-fpm could not be started. 109 | 110 | ### Using git sources 111 | 112 | Caddy can serve sites from git repository using [git](https://caddyserver.com/docs/git) middleware. 113 | 114 | ##### Create Caddyfile 115 | 116 | Replace `github.com/team/repo` with your repository. 117 | 118 | ```sh 119 | $ printf "0.0.0.0\ngit github.com/team/repo" > Caddyfile 120 | ``` 121 | 122 | ##### Run the image 123 | 124 | ```sh 125 | $ docker run -d --name examplecaddy -v $(pwd)/Caddyfile:/etc/Caddyfile -p 2015:2015 yobasystems/alpine-caddy 126 | ``` 127 | Point your browser to `http://host-ip:2015`. 128 | 129 | ## Usage 130 | 131 | #### Default Caddyfile 132 | 133 | The image contains a default Caddyfile. 134 | 135 | ``` 136 | 0.0.0.0 137 | browse 138 | fastcgi / 127.0.0.1:9000 php # php variant only 139 | startup php-fpm # php variant only 140 | ``` 141 | **Note** the last 2 lines are only present in the php variant. 142 | 143 | #### Paths in container 144 | 145 | Caddyfile: `/etc/Caddyfile` 146 | 147 | Sites root: `/srv` 148 | 149 | #### Using local Caddyfile and sites root 150 | 151 | Replace `/path/to/Caddyfile` and `/path/to/sites/root` accordingly. 152 | 153 | ```sh 154 | $ docker run -d --name examplecaddy -v /path/to/sites/root:/srv -v path/to/Caddyfile:/etc/Caddyfile -p 2015:2015 yobasystems/alpine-caddy 155 | ``` 156 | 157 | ### Let's Encrypt Auto SSL 158 | **Note** that this does not work on local environments, the domain also has to resolve to the server requesting the certificate. 159 | 160 | Use a valid domain and add email to your Caddyfile to avoid prompt at runtime. 161 | Replace `example.co.uk` with your domain and `user@example.co.uk` with your email. 162 | ``` 163 | example.co.uk 164 | tls user@example.co.uk 165 | ``` 166 | 167 | ##### Run the image 168 | 169 | You can change the the ports if ports 80 and 443 are not available on host. e.g. 81:80, 444:443 170 | 171 | ```sh 172 | $ docker run -d --name examplecaddy -v $(pwd)/Caddyfile:/etc/Caddyfile -p 80:80 -p 443:443 yobasystems/alpine-caddy 173 | ``` 174 | 175 | **Optional** but advised. Save certificates on host machine to prevent regeneration every time container starts. 176 | Let's Encrypts [RATE LIMITS](https://community.letsencrypt.org/t/rate-limits-for-lets-encrypt/6769) explain the number of times you can regenerate certificates. 177 | 178 | ```sh 179 | $ docker run -d -v $(pwd)/Caddyfile:/etc/Caddyfile -v $HOME/.caddy:/root/.caddy -p 80:80 -p 443:443 yobasystems/alpine-caddy 180 | ``` 181 | 182 | ## 🔍 Image contents & Vulnerability analysis 183 | 184 | | PACKAGE NAME | PACKAGE VERSION | VULNERABILITIES | 185 | |-----------------------|-----------------|-----------------| 186 | 187 | 188 | ## 📚 Source Repositories 189 | 190 | * [Github - yobasystems/alpine-caddy](https://github.com/yobasystems/alpine-caddy) 191 | * [Gitlab - yobasystems/alpine-caddy](https://gitlab.com/yobasystems/alpine-caddy) 192 | * [Bitbucket - yobasystems/alpine-caddy](https://bitbucket.org/yobasystems/alpine-caddy/) 193 | 194 | 195 | ## 🐳 Container Registries 196 | 197 | * [Dockerhub - yobasystems/alpine-caddy](https://hub.docker.com/r/yobasystems/alpine-caddy/) 198 | * [Quay.io - yobasystems/alpine-caddy](https://quay.io/repository/yobasystems/alpine-caddy) 199 | * [GHCR - yobasystems/alpine-caddy](https://ghcr.io/yobasystems/alpine-caddy) 200 | 201 | 202 | ## 🔗 Links 203 | 204 | * [Yoba Systems](https://yoba.systems/) 205 | * [Github - Yoba Systems](https://github.com/yobasystems/) 206 | * [Dockerhub - Yoba Systems](https://hub.docker.com/u/yobasystems/) 207 | * [Quay.io - Yoba Systems](https://quay.io/organization/yobasystems) 208 | * [GHCR - Yoba Systems](https://ghcr.io/yobasystems) 209 | * [Maintainer - Dominic Taylor](https://github.com/dominictayloruk) 210 | 211 | ## 💰 Donation 212 | 213 | [![BMAC](https://img.shields.io/badge/BUY%20ME%20A%20COFFEE-£5-blue.svg?style=for-the-badge&logo=buy-me-a-coffee)](https://www.buymeacoffee.com/dominictayloruk?new=1) 214 | 215 | [![BITCOIN](https://img.shields.io/badge/BTC-bc1q7hy8qmyvq7rw6slrna7yffcdnj9rcg4e9xjecc-blue.svg?style=for-the-badge&logo=bitcoin)](bitcoin:bc1q7hy8qmyvq7rw6slrna7yffcdnj9rcg4e9xjecc) 216 | 217 | [![ETHEREUM](https://img.shields.io/badge/ETH-0xb6bE2e4da3d86b50Bdae1F9B6960c23dd87C532C-blue.svg?style=for-the-badge&logo=ethereum)](ethereum:0xb6bE2e4da3d86b50Bdae1F9B6960c23dd87C532C) 218 | -------------------------------------------------------------------------------- /alpine-caddy-aarch64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM yobasystems/alpine:3.21.3-aarch64 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL maintainer="Dominic Taylor " \ 7 | architecture="arm64v8/aarch64" \ 8 | caddy-version="2.9.1" \ 9 | alpine-version="3.21.3" \ 10 | build="24-Mar-2025" \ 11 | org.opencontainers.image.title="alpine-caddy" \ 12 | org.opencontainers.image.description="Caddy container image running on Alpine Linux" \ 13 | org.opencontainers.image.authors="Dominic Taylor " \ 14 | org.opencontainers.image.vendor="Yoba Systems" \ 15 | org.opencontainers.image.version="2.9.1" \ 16 | org.opencontainers.image.url="https://hub.docker.com/r/yobasystems/alpine-caddy/" \ 17 | org.opencontainers.image.source="https://github.com/yobasystems/alpine-caddy" \ 18 | org.opencontainers.image.base.name="docker.io/yobasystems/alpine:3.21.3" \ 19 | org.opencontainers.image.revision=$VCS_REF \ 20 | org.opencontainers.image.created=$BUILD_DATE 21 | 22 | RUN apk add --no-cache openssh-client git tar curl libcap ca-certificates mailcap 23 | 24 | RUN curl --silent --show-error --fail --location --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ 25 | "https://github.com/caddyserver/caddy/releases/download/v2.9.1/caddy_2.9.1_linux_arm64.tar.gz" \ 26 | | tar --no-same-owner -C /usr/bin/ -xz caddy && \ 27 | chmod 0755 /usr/bin/caddy && \ 28 | addgroup -S caddy && \ 29 | adduser -D -S -s /sbin/nologin -G caddy caddy && \ 30 | setcap cap_net_bind_service=+ep `readlink -f /usr/bin/caddy` && \ 31 | /usr/bin/caddy version 32 | 33 | RUN echo 'hosts: files dns' > /etc/nsswitch.conf 34 | 35 | VOLUME /config 36 | VOLUME /srv 37 | 38 | COPY files/Caddyfile /etc/Caddyfile 39 | COPY files/index.html /srv/index.html 40 | 41 | RUN chown -R caddy:caddy /srv 42 | 43 | USER caddy 44 | 45 | EXPOSE 80 443 2015 46 | 47 | WORKDIR /srv 48 | 49 | CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] 50 | -------------------------------------------------------------------------------- /alpine-caddy-aarch64/files/Caddyfile: -------------------------------------------------------------------------------- 1 | # The Caddyfile is an easy way to configure your Caddy web server. 2 | # 3 | # Unless the file starts with a global options block, the first 4 | # uncommented line is always the address of your site. 5 | # 6 | # To use your own domain name (with automatic HTTPS), first make 7 | # sure your domain's A/AAAA DNS records are properly pointed to 8 | # this machine's public IP, then replace ":80" below with your 9 | # domain name. 10 | 11 | :80 { 12 | # Set this path to your site's directory. 13 | root * /usr/share/caddy 14 | 15 | # Enable the static file server. 16 | file_server 17 | 18 | # Another common task is to set up a reverse proxy: 19 | # reverse_proxy localhost:8080 20 | 21 | # Or serve a PHP site through php-fpm: 22 | # php_fastcgi localhost:9000 23 | } 24 | 25 | # Refer to the Caddy docs for more information: 26 | # https://caddyserver.com/docs/caddyfile -------------------------------------------------------------------------------- /alpine-caddy-aarch64/files/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Caddy Web Server running on Alpine Linux 5 | 8 | 9 | 10 |

Caddy Web Server running on Alpine Linux.

11 |

If you see this page, Caddy Web Server running on Alpine Linux in a Docker container works.

12 |

More instructions about Caddy is here.

13 | 14 | 15 | -------------------------------------------------------------------------------- /alpine-caddy-amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM yobasystems/alpine:3.21.3-amd64 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL maintainer="Dominic Taylor " \ 7 | architecture="amd64/x86_64" \ 8 | caddy-version="2.9.1" \ 9 | alpine-version="3.21.3" \ 10 | build="24-Mar-2025" \ 11 | org.opencontainers.image.title="alpine-caddy" \ 12 | org.opencontainers.image.description="Caddy container image running on Alpine Linux" \ 13 | org.opencontainers.image.authors="Dominic Taylor " \ 14 | org.opencontainers.image.vendor="Yoba Systems" \ 15 | org.opencontainers.image.version="2.9.1" \ 16 | org.opencontainers.image.url="https://hub.docker.com/r/yobasystems/alpine-caddy/" \ 17 | org.opencontainers.image.source="https://github.com/yobasystems/alpine-caddy" \ 18 | org.opencontainers.image.base.name="docker.io/yobasystems/alpine:3.21.3" \ 19 | org.opencontainers.image.revision=$VCS_REF \ 20 | org.opencontainers.image.created=$BUILD_DATE 21 | 22 | RUN apk add --no-cache openssh-client git tar curl libcap ca-certificates mailcap 23 | 24 | RUN curl --silent --show-error --fail --location --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ 25 | "https://github.com/caddyserver/caddy/releases/download/v2.9.1/caddy_2.9.1_linux_amd64.tar.gz" \ 26 | | tar --no-same-owner -C /usr/bin/ -xz caddy && \ 27 | chmod 0755 /usr/bin/caddy && \ 28 | addgroup -S caddy && \ 29 | adduser -D -S -s /sbin/nologin -G caddy caddy && \ 30 | setcap cap_net_bind_service=+ep `readlink -f /usr/bin/caddy` && \ 31 | /usr/bin/caddy version 32 | 33 | RUN echo 'hosts: files dns' > /etc/nsswitch.conf 34 | 35 | VOLUME /config 36 | VOLUME /srv 37 | 38 | COPY files/Caddyfile /etc/Caddyfile 39 | COPY files/index.html /srv/index.html 40 | 41 | RUN chown -R caddy:caddy /srv 42 | 43 | USER caddy 44 | 45 | EXPOSE 80 443 2015 46 | 47 | WORKDIR /srv 48 | 49 | CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] 50 | -------------------------------------------------------------------------------- /alpine-caddy-amd64/files/Caddyfile: -------------------------------------------------------------------------------- 1 | # The Caddyfile is an easy way to configure your Caddy web server. 2 | # 3 | # Unless the file starts with a global options block, the first 4 | # uncommented line is always the address of your site. 5 | # 6 | # To use your own domain name (with automatic HTTPS), first make 7 | # sure your domain's A/AAAA DNS records are properly pointed to 8 | # this machine's public IP, then replace ":80" below with your 9 | # domain name. 10 | 11 | :80 { 12 | # Set this path to your site's directory. 13 | root * /usr/share/caddy 14 | 15 | # Enable the static file server. 16 | file_server 17 | 18 | # Another common task is to set up a reverse proxy: 19 | # reverse_proxy localhost:8080 20 | 21 | # Or serve a PHP site through php-fpm: 22 | # php_fastcgi localhost:9000 23 | } 24 | 25 | # Refer to the Caddy docs for more information: 26 | # https://caddyserver.com/docs/caddyfile -------------------------------------------------------------------------------- /alpine-caddy-amd64/files/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Caddy Web Server running on Alpine Linux 5 | 8 | 9 | 10 |

Caddy Web Server running on Alpine Linux.

11 |

If you see this page, Caddy Web Server running on Alpine Linux in a Docker container works.

12 |

More instructions about Caddy is here.

13 | 14 | 15 | -------------------------------------------------------------------------------- /alpine-caddy-armhf/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM yobasystems/alpine:3.21.3-armhf 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL maintainer="Dominic Taylor " \ 7 | architecture="arm32v7/armhf" \ 8 | caddy-version="2.9.1" \ 9 | alpine-version="3.21.3" \ 10 | build="24-Mar-2025" \ 11 | org.opencontainers.image.title="alpine-caddy" \ 12 | org.opencontainers.image.description="Caddy container image running on Alpine Linux" \ 13 | org.opencontainers.image.authors="Dominic Taylor " \ 14 | org.opencontainers.image.vendor="Yoba Systems" \ 15 | org.opencontainers.image.version="2.9.1" \ 16 | org.opencontainers.image.url="https://hub.docker.com/r/yobasystems/alpine-caddy/" \ 17 | org.opencontainers.image.source="https://github.com/yobasystems/alpine-caddy" \ 18 | org.opencontainers.image.base.name="docker.io/yobasystems/alpine:3.21.3" \ 19 | org.opencontainers.image.revision=$VCS_REF \ 20 | org.opencontainers.image.created=$BUILD_DATE 21 | 22 | RUN apk add --no-cache openssh-client git tar curl libcap ca-certificates mailcap 23 | 24 | RUN curl --silent --show-error --fail --location --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ 25 | "https://github.com/caddyserver/caddy/releases/download/v2.9.1/caddy_2.9.1_linux_armv7.tar.gz" \ 26 | | tar --no-same-owner -C /usr/bin/ -xz caddy && \ 27 | chmod 0755 /usr/bin/caddy && \ 28 | addgroup -S caddy && \ 29 | adduser -D -S -s /sbin/nologin -G caddy caddy && \ 30 | setcap cap_net_bind_service=+ep `readlink -f /usr/bin/caddy` && \ 31 | /usr/bin/caddy version 32 | 33 | RUN echo 'hosts: files dns' > /etc/nsswitch.conf 34 | 35 | VOLUME /config 36 | VOLUME /srv 37 | 38 | COPY files/Caddyfile /etc/Caddyfile 39 | COPY files/index.html /srv/index.html 40 | 41 | RUN chown -R caddy:caddy /srv 42 | 43 | USER caddy 44 | 45 | EXPOSE 80 443 2015 46 | 47 | WORKDIR /srv 48 | 49 | CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] 50 | -------------------------------------------------------------------------------- /alpine-caddy-armhf/files/Caddyfile: -------------------------------------------------------------------------------- 1 | # The Caddyfile is an easy way to configure your Caddy web server. 2 | # 3 | # Unless the file starts with a global options block, the first 4 | # uncommented line is always the address of your site. 5 | # 6 | # To use your own domain name (with automatic HTTPS), first make 7 | # sure your domain's A/AAAA DNS records are properly pointed to 8 | # this machine's public IP, then replace ":80" below with your 9 | # domain name. 10 | 11 | :80 { 12 | # Set this path to your site's directory. 13 | root * /usr/share/caddy 14 | 15 | # Enable the static file server. 16 | file_server 17 | 18 | # Another common task is to set up a reverse proxy: 19 | # reverse_proxy localhost:8080 20 | 21 | # Or serve a PHP site through php-fpm: 22 | # php_fastcgi localhost:9000 23 | } 24 | 25 | # Refer to the Caddy docs for more information: 26 | # https://caddyserver.com/docs/caddyfile -------------------------------------------------------------------------------- /alpine-caddy-armhf/files/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Caddy Web Server running on Alpine Linux 5 | 8 | 9 | 10 |

Caddy Web Server running on Alpine Linux.

11 |

If you see this page, Caddy Web Server running on Alpine Linux in a Docker container works.

12 |

More instructions about Caddy is here.

13 | 14 | 15 | -------------------------------------------------------------------------------- /alpine-caddy-php-aarch64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM yobasystems/alpine:3.21.3-aarch64 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL maintainer="Dominic Taylor " \ 7 | architecture="arm64v8/aarch64" \ 8 | caddy-version="2.9.1" \ 9 | alpine-version="3.21.3" \ 10 | build="24-Mar-2025" \ 11 | org.opencontainers.image.title="alpine-caddy" \ 12 | org.opencontainers.image.description="Caddy container image running on Alpine Linux" \ 13 | org.opencontainers.image.authors="Dominic Taylor " \ 14 | org.opencontainers.image.vendor="Yoba Systems" \ 15 | org.opencontainers.image.version="2.9.1-php" \ 16 | org.opencontainers.image.url="https://hub.docker.com/r/yobasystems/alpine-caddy/" \ 17 | org.opencontainers.image.source="https://github.com/yobasystems/alpine-caddy" \ 18 | org.opencontainers.image.base.name="docker.io/yobasystems/alpine:3.21.3" \ 19 | org.opencontainers.image.revision=$VCS_REF \ 20 | org.opencontainers.image.created=$BUILD_DATE 21 | 22 | RUN apk add --no-cache openssh-client git libcap tar php83 php83-fpm curl ca-certificates mailcap \ 23 | php83-curl php83-gd php83-zip php83-iconv php83-sqlite3 php83-mysqli php83-pgsql php83-json php83-phar php83-openssl php83-zlib 24 | 25 | RUN curl --silent --show-error --fail --location \ 26 | --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" \ 27 | "https://getcomposer.org/installer" \ 28 | | php83 -- --install-dir=/usr/bin --filename=composer 29 | 30 | RUN echo "clear_env = no" >> /etc/php83/php-fpm.conf 31 | 32 | RUN curl --silent --show-error --fail --location --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ 33 | "https://github.com/caddyserver/caddy/releases/download/v2.9.1/caddy_2.9.1_linux_arm64.tar.gz" \ 34 | | tar --no-same-owner -C /usr/bin/ -xz caddy && \ 35 | chmod 0755 /usr/bin/caddy && \ 36 | addgroup -S caddy && \ 37 | adduser -D -S -s /sbin/nologin -G caddy caddy && \ 38 | setcap cap_net_bind_service=+ep `readlink -f /usr/bin/caddy` && \ 39 | /usr/bin/caddy version 40 | 41 | RUN echo 'hosts: files dns' > /etc/nsswitch.conf 42 | 43 | VOLUME /config 44 | VOLUME /srv 45 | 46 | COPY files/Caddyfile /etc/Caddyfile 47 | COPY files/index.php /srv/index.php 48 | 49 | RUN chown -R caddy:caddy /srv 50 | 51 | USER caddy 52 | 53 | EXPOSE 80 443 2015 54 | 55 | WORKDIR /srv 56 | 57 | CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] 58 | -------------------------------------------------------------------------------- /alpine-caddy-php-aarch64/files/Caddyfile: -------------------------------------------------------------------------------- 1 | # The Caddyfile is an easy way to configure your Caddy web server. 2 | # 3 | # Unless the file starts with a global options block, the first 4 | # uncommented line is always the address of your site. 5 | # 6 | # To use your own domain name (with automatic HTTPS), first make 7 | # sure your domain's A/AAAA DNS records are properly pointed to 8 | # this machine's public IP, then replace ":80" below with your 9 | # domain name. 10 | 11 | :80 { 12 | # Set this path to your site's directory. 13 | root * /usr/share/caddy 14 | 15 | # Enable the static file server. 16 | file_server 17 | 18 | # Another common task is to set up a reverse proxy: 19 | # reverse_proxy localhost:8080 20 | 21 | # Or serve a PHP site through php-fpm: 22 | php_fastcgi 127.0.0.1:9000 23 | } 24 | 25 | # Refer to the Caddy docs for more information: 26 | # https://caddyserver.com/docs/caddyfile -------------------------------------------------------------------------------- /alpine-caddy-php-aarch64/files/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Caddy Web Server with PHP running on Alpine Linux. 5 | 8 | 9 | 10 |

Caddy Web Server with PHP running on Alpine Linux.

11 |

If you see this page, Caddy Web Server with PHP running on Alpine Linux in a Docker container works.

12 |

More instructions about Caddy is here.

13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /alpine-caddy-php-amd64/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM yobasystems/alpine:3.21.3-amd64 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL maintainer="Dominic Taylor " \ 7 | architecture="amd64/x86_64" \ 8 | caddy-version="2.9.1" \ 9 | alpine-version="3.21.3" \ 10 | build="24-Mar-2025" \ 11 | org.opencontainers.image.title="alpine-caddy" \ 12 | org.opencontainers.image.description="Caddy container image running on Alpine Linux" \ 13 | org.opencontainers.image.authors="Dominic Taylor " \ 14 | org.opencontainers.image.vendor="Yoba Systems" \ 15 | org.opencontainers.image.version="2.9.1-php" \ 16 | org.opencontainers.image.url="https://hub.docker.com/r/yobasystems/alpine-caddy/" \ 17 | org.opencontainers.image.source="https://github.com/yobasystems/alpine-caddy" \ 18 | org.opencontainers.image.base.name="docker.io/yobasystems/alpine:3.21.3" \ 19 | org.opencontainers.image.revision=$VCS_REF \ 20 | org.opencontainers.image.created=$BUILD_DATE 21 | 22 | RUN apk add --no-cache openssh-client git libcap tar php83 php83-fpm curl ca-certificates mailcap \ 23 | php83-curl php83-gd php83-zip php83-iconv php83-sqlite3 php83-mysqli php83-pgsql php83-json php83-phar php83-openssl php83-zlib 24 | 25 | RUN curl --silent --show-error --fail --location \ 26 | --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" \ 27 | "https://getcomposer.org/installer" \ 28 | | php83 -- --install-dir=/usr/bin --filename=composer 29 | 30 | RUN echo "clear_env = no" >> /etc/php83/php-fpm.conf 31 | 32 | RUN curl --silent --show-error --fail --location --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ 33 | "https://github.com/caddyserver/caddy/releases/download/v2.9.1/caddy_2.9.1_linux_amd64.tar.gz" \ 34 | | tar --no-same-owner -C /usr/bin/ -xz caddy && \ 35 | chmod 0755 /usr/bin/caddy && \ 36 | addgroup -S caddy && \ 37 | adduser -D -S -s /sbin/nologin -G caddy caddy && \ 38 | setcap cap_net_bind_service=+ep `readlink -f /usr/bin/caddy` && \ 39 | /usr/bin/caddy version 40 | 41 | RUN echo 'hosts: files dns' > /etc/nsswitch.conf 42 | 43 | VOLUME /config 44 | VOLUME /srv 45 | 46 | COPY files/Caddyfile /etc/Caddyfile 47 | COPY files/index.php /srv/index.php 48 | 49 | RUN chown -R caddy:caddy /srv 50 | 51 | USER caddy 52 | 53 | EXPOSE 80 443 2015 54 | 55 | WORKDIR /srv 56 | 57 | CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] 58 | -------------------------------------------------------------------------------- /alpine-caddy-php-amd64/files/Caddyfile: -------------------------------------------------------------------------------- 1 | # The Caddyfile is an easy way to configure your Caddy web server. 2 | # 3 | # Unless the file starts with a global options block, the first 4 | # uncommented line is always the address of your site. 5 | # 6 | # To use your own domain name (with automatic HTTPS), first make 7 | # sure your domain's A/AAAA DNS records are properly pointed to 8 | # this machine's public IP, then replace ":80" below with your 9 | # domain name. 10 | 11 | :80 { 12 | # Set this path to your site's directory. 13 | root * /usr/share/caddy 14 | 15 | # Enable the static file server. 16 | file_server 17 | 18 | # Another common task is to set up a reverse proxy: 19 | # reverse_proxy localhost:8080 20 | 21 | # Or serve a PHP site through php-fpm: 22 | php_fastcgi 127.0.0.1:9000 23 | } 24 | 25 | # Refer to the Caddy docs for more information: 26 | # https://caddyserver.com/docs/caddyfile -------------------------------------------------------------------------------- /alpine-caddy-php-amd64/files/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Caddy Web Server with PHP running on Alpine Linux. 5 | 8 | 9 | 10 |

Caddy Web Server with PHP running on Alpine Linux.

11 |

If you see this page, Caddy Web Server with PHP running on Alpine Linux in a Docker container works.

12 |

More instructions about Caddy is here.

13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /alpine-caddy-php-armhf/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM yobasystems/alpine:3.21.3-armhf 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL maintainer="Dominic Taylor " \ 7 | architecture="arm32v7/armhf" \ 8 | caddy-version="2.9.1" \ 9 | alpine-version="3.21.3" \ 10 | build="24-Mar-2025" \ 11 | org.opencontainers.image.title="alpine-caddy" \ 12 | org.opencontainers.image.description="Caddy container image running on Alpine Linux" \ 13 | org.opencontainers.image.authors="Dominic Taylor " \ 14 | org.opencontainers.image.vendor="Yoba Systems" \ 15 | org.opencontainers.image.version="2.9.1-php" \ 16 | org.opencontainers.image.url="https://hub.docker.com/r/yobasystems/alpine-caddy/" \ 17 | org.opencontainers.image.source="https://github.com/yobasystems/alpine-caddy" \ 18 | org.opencontainers.image.base.name="docker.io/yobasystems/alpine:3.21.3" \ 19 | org.opencontainers.image.revision=$VCS_REF \ 20 | org.opencontainers.image.created=$BUILD_DATE 21 | 22 | RUN apk add --no-cache openssh-client git libcap tar php83 php83-fpm curl ca-certificates mailcap \ 23 | php83-curl php83-gd php83-zip php83-iconv php83-sqlite3 php83-mysqli php83-pgsql php83-json php83-phar php83-openssl php83-zlib 24 | 25 | RUN curl --silent --show-error --fail --location \ 26 | --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" \ 27 | "https://getcomposer.org/installer" \ 28 | | php83 -- --install-dir=/usr/bin --filename=composer 29 | 30 | RUN echo "clear_env = no" >> /etc/php83/php-fpm.conf 31 | 32 | RUN curl --silent --show-error --fail --location --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ 33 | "https://github.com/caddyserver/caddy/releases/download/v2.9.1/caddy_2.9.1_linux_armv7.tar.gz" \ 34 | | tar --no-same-owner -C /usr/bin/ -xz caddy && \ 35 | chmod 0755 /usr/bin/caddy && \ 36 | addgroup -S caddy && \ 37 | adduser -D -S -s /sbin/nologin -G caddy caddy && \ 38 | setcap cap_net_bind_service=+ep `readlink -f /usr/bin/caddy` && \ 39 | /usr/bin/caddy version 40 | 41 | RUN echo 'hosts: files dns' > /etc/nsswitch.conf 42 | 43 | VOLUME /config 44 | VOLUME /srv 45 | 46 | COPY files/Caddyfile /etc/Caddyfile 47 | COPY files/index.php /srv/index.php 48 | 49 | RUN chown -R caddy:caddy /srv 50 | 51 | USER caddy 52 | 53 | EXPOSE 80 443 2015 54 | 55 | WORKDIR /srv 56 | 57 | CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] -------------------------------------------------------------------------------- /alpine-caddy-php-armhf/files/Caddyfile: -------------------------------------------------------------------------------- 1 | # The Caddyfile is an easy way to configure your Caddy web server. 2 | # 3 | # Unless the file starts with a global options block, the first 4 | # uncommented line is always the address of your site. 5 | # 6 | # To use your own domain name (with automatic HTTPS), first make 7 | # sure your domain's A/AAAA DNS records are properly pointed to 8 | # this machine's public IP, then replace ":80" below with your 9 | # domain name. 10 | 11 | :80 { 12 | # Set this path to your site's directory. 13 | root * /usr/share/caddy 14 | 15 | # Enable the static file server. 16 | file_server 17 | 18 | # Another common task is to set up a reverse proxy: 19 | # reverse_proxy localhost:8080 20 | 21 | # Or serve a PHP site through php-fpm: 22 | php_fastcgi 127.0.0.1:9000 23 | } 24 | 25 | # Refer to the Caddy docs for more information: 26 | # https://caddyserver.com/docs/caddyfile -------------------------------------------------------------------------------- /alpine-caddy-php-armhf/files/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Caddy Web Server with PHP running on Alpine Linux. 5 | 8 | 9 | 10 |

Caddy Web Server with PHP running on Alpine Linux.

11 |

If you see this page, Caddy Web Server with PHP running on Alpine Linux in a Docker container works.

12 |

More instructions about Caddy is here.

13 | 16 | 17 | 18 | --------------------------------------------------------------------------------