All Projects → qdm12 → caddy-scratch

qdm12 / caddy-scratch

Licence: MIT license
Caddy server 2.0.0 / 1.0.5 on Docker Scratch, all in 18MB / 35MB

Programming Languages

Dockerfile
14818 projects

Projects that are alternatives of or similar to caddy-scratch

caddy-esi
Middleware for Caddy Server integrating ESI (edge side includes) tags with parallel loading. Able to connect to HTTP/S/2, Memcache, Redis, shell scripts, gRPC and SQL backends 🐜🐜🐜
Stars: ✭ 28 (-12.5%)
Mutual labels:  caddy, caddy-server
souin
An HTTP cache system, RFC compliant, compatible with @TykTechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @gin-gonic, @zalando, @zeromicro, @nginx and @apache
Stars: ✭ 269 (+740.63%)
Mutual labels:  caddy, caddy-server
awesome-caddy
A curated list of awesome Caddy resources
Stars: ✭ 30 (-6.25%)
Mutual labels:  caddy, caddy-server
gollum-galore
🍬 Gollum wiki with lots of sugar 🍬
Stars: ✭ 14 (-56.25%)
Mutual labels:  caddy, caddy-server
Caddy Gen
Automated Caddy reverse proxy for docker containers
Stars: ✭ 139 (+334.38%)
Mutual labels:  proxy-server, caddy
caddygit
Git module for Caddy v2
Stars: ✭ 67 (+109.38%)
Mutual labels:  caddy
asyncio-socks-server
A SOCKS proxy server implemented with the powerful python cooperative concurrency framework asyncio.
Stars: ✭ 154 (+381.25%)
Mutual labels:  proxy-server
go-docker
Sample code and dockerfiles accompanying the blog post The Ultimate Guide to Writing Dockerfiles for Go Web-apps
Stars: ✭ 89 (+178.13%)
Mutual labels:  scratch
bproxy
high-performance minimal HTTP reverse proxy
Stars: ✭ 28 (-12.5%)
Mutual labels:  proxy-server
cappy
☕🗄CAching Proxy in Python – Simple file based python http proxy
Stars: ✭ 15 (-53.12%)
Mutual labels:  proxy-server
docker-django-nginx-uwsgi-postgres-load-balance-tutorial
實戰 Docker + Django + Nginx + uWSGI + Postgres - Load Balance -Tutorial 📝
Stars: ✭ 102 (+218.75%)
Mutual labels:  proxy-server
json-caching-proxy
Node caching HTTP proxy built on top of express-http-proxy. Persists requests and responses to an in-memory HAR-like data structure based on HAR1.2 . Caches JSON content-type responses by default with the ability to cache an entire site; including content-types describing images. Useful for testing front end code, mocking api, and saving the cac…
Stars: ✭ 31 (-3.12%)
Mutual labels:  proxy-server
SpoofDPI
A simple and fast anti-censorship tool written in Go
Stars: ✭ 170 (+431.25%)
Mutual labels:  proxy-server
niftygate
Drop-in Access Control via NFT Ownership
Stars: ✭ 61 (+90.63%)
Mutual labels:  proxy-server
Socks5
A full-fledged high-performance socks5 proxy server written in C#. Plugin support included.
Stars: ✭ 331 (+934.38%)
Mutual labels:  proxy-server
PoW-Shield
Project dedicated to fight Layer 7 DDoS with proof of work, featuring an additional WAF. Completed with full set of features and containerized for rapid and lightweight deployment.
Stars: ✭ 99 (+209.38%)
Mutual labels:  proxy-server
scratch-LN
https://scratch4d.github.io/scratch-LN/
Stars: ✭ 19 (-40.62%)
Mutual labels:  scratch
torchestrator
Spin up Tor containers and then proxy HTTP requests via these Tor instances
Stars: ✭ 32 (+0%)
Mutual labels:  proxy-server
squid proxy pool
Squid 代理池搭建
Stars: ✭ 88 (+175%)
Mutual labels:  proxy-server
ScratchRadio
Educational software for use with the LimeSDR platform
Stars: ✭ 64 (+100%)
Mutual labels:  scratch

Caddy Scratch Docker

Caddy server v2.4.1 / v1.0.5 without root, without OS and with optional Caddy plugins

Build status

dockeri.co

Last release Last Docker tag Last release size GitHub last release date Commits since release

Latest size

GitHub last commit GitHub commit activity GitHub closed PRs GitHub issues GitHub closed issues

MIT Visitors count

Features

  • Scratch based, so less attack surface and tiny
  • Runs without root
  • Plugins
Docker tag Caddy version Size Documentation CPU architectures
:latest v2.4.1 37.3MB ➡️ Setup below amd64, 386, arm64, armv7
:v2.4.1 v2.4.1 37.5MB ➡️ Setup below amd64, 386, arm64, armv7
:2.3.0 v2.3.0 37.3MB ➡️ Setup below amd64, 386, arm64, armv7
:v2.2.1 v2.2.1 33.9MB ➡️ Setup below amd64, 386, arm64, armv7
:v2.1.0 v2.1.0 39.2MB ➡️ Wiki link amd64, 386, arm64, armv7
:v2.0.0 v2.0.0 35.4MB ➡️ Wiki link amd64, 386, arm64, armv7
:v1.0.5 v1.0.5 17.2MB ➡️ Wiki link amd64, 386, arm64
:v1.0.4 v1.0.4 17.3MB ➡️ Wiki link amd64, 386, arm64

Size: uncompressed amd64 built Docker image

Setup

✈️ Migrating from v1.0.x? ➡️ Wiki: Migrating

⚠️ The following applies to the :latest tag. For other Docker tags, refer to the Wiki

docker run -d --name caddy -p 80:8080/tcp -p 443:8443/tcp qmcgaw/caddy-scratch

or use docker-compose.yml with:

docker-compose up -d

The data is persistent in a Docker anonymous volume by default.

Caddyfile

By default, this runs using the repository Caddyfile. You could work you way out modifying the Caddy configuration using the Caddy API. Otherwise, if you want to use a Caddyfile, follow these steps.

  1. Create the directory: mkdir caddydir

  2. Create a Caddyfile with the content you would like, in caddydir/Caddyfile. Note that at the top of your Caddyfile, there should be at least the following global block:

    {
        http_port 8080
        https_port 8443
    }
    
  3. Change the ownership and permission to match the Docker container

    chown -R 1000 caddydir
    chmod -R 700 caddydir

    If you are on Windows, you may skip this step.

    Alternatively, you can run the container with --user="1001" for example, or as root with --user="root" (unadvised).

  4. Assuming your current file path is /yourpath, run the container with:

    docker run -d --name caddy -p 80:8080/tcp -p 443:8443/tcp \
        -v /yourpath/caddydir:/caddydir qmcgaw/caddy-scratch

Log times

If log times are not correct, it's because you need to set your timezone in the TZ environment variable. For example, add -e TZ=America/Montreal to your Docker run command.

Update

Update the docker image with docker pull qmcgaw/caddy-scratch

Caddy API

To access the Caddy API, you need:

  • your Caddyfile to contain admin 0.0.0.0:2019 at the top global block (as is in the default Caddyfile)
  • (eventually) have port 2019 published by adding -p 2019:2019/tcp to your Docker run command

Plugins

You need Git installed.

If you want to have for example the github.com/caddyserver/ntlm-transport plugin, build the image with

docker build -t qmcgaw/caddy \
    --build-arg PLUGINS=github.com/caddyserver/ntlm-transport \
    https://github.com/qdm12/caddy-scratch.git

Extra

  • Assuming your container is called caddy, you can reload the Caddyfile with:

    docker kill --signal=USR1 caddy

TODOs

  • Telemetry off with build argument
  • Use lists of IPs to block with ipfilter with import blockIps
  • Healthcheck for Caddy
  • Intelligent IP blocking

Thanks

  • To the Caddy developers and mholt especially
  • To the Caddy plugins developers
  • To abiosoft for helping me out building this Docker image
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].