Skip to content

Documentation for running Caddy in Docker #296

@lodi-g

Description

@lodi-g

Problem
I have not installed Caddy on my dev machine and do not wish to do so. However, I still want to use caddy fmt.
It's easy to run it manually via Docker but doesn't leverage the full features of this extension.

Solution
I wrote a super simple wrapper script to make this extension work with a dockerized Caddy. It could be interesting to add it to the documentation. It works on MacOS (and most likely on Linux, not tested).

#!/usr/bin/env bash

cat /dev/stdin | docker run --rm -i --entrypoint caddy caddy:2.6-alpine "$@"

Once the script is set up somewhere, just point caddy.executable to it and it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions