How to deploy a Caddy web server with Docker

insert image description here

Caddy is a popular modern web server designed for high performance and memory safety. It's written in Go, runs with no dependencies, has built-in support for static site rendering with Markdown, and provides automatic HTTPS.

Caddy focuses on providing a simple server management experience, giving you useful features by default. It is easier to configure and maintain than competing systems such as Apache and NGINX. In this article, we'll show how to run your own server with minimal setup using Docker with the official Caddy image.

select image tag

Caddy images come in several different styles. As of this writing, the latest version of Caddy is shared by all v2.4. You can use 2.4.x (replace x with a specific patch version), 2.4, , or 2 to pin to major, minor or patch components.

Caddy is available for Linux and Windows Docker hosts. Alpine Linux, Windows Server Core 1809, and Windows Server Core 2016 LTSC releases are the current operating system options. Referencing a naked Caddy tag, e.g. caddy:2 will choose the appropriate image for your platform; you can use the variant 2.4-alpine or 2.4.6-windowsservercore-1809 instead to be more explicit.

Start the base server

Caddy ships in a ready-to-run configuration. The Docker image will serve your web content from the /usr/share/caddy directory. You can do this by adding the main

Guess you like

Origin blog.csdn.net/wlcs_6305/article/details/123433020