When I go to Caddy's site, it says "Big Deca" and proudly. THE ULTIMATE SERVER It's hard to say so far. Caddy is an open source web server whose first edition is new as April 28, 2015. It is written in Go language and uses the Go standard library for HTTP functions. Also, unlike other web servers, it uses HTTPS by default.
Last time I started Nginx using docker without putting Nginx in CentOS 8, but the same thing Try it with Caddy. Click here for Qiia's article.
It was confirmed last time, but the environment again. CentOS Linux release 8.2.2004 (Core) Docker version 19.03.13, build 4484c46d9d
Check that there is no docker container or image.
# docker ps -a
# docker images
Start Caddy
80 caddy
```# docker ps -a```
```# docker images```
<a href="https://ebios10.up.seesaa.net/image/2020-10-21_180252.png " target="_blank"><img border="0" alt="2020-10-21_180252.png " src="https://ebios10.up.seesaa.net/image/2020-10-21_180252-thumbnail2.png " width="640" height="141"></a>
I was able to pull the caddy and even start the container without doing anything special.
# Access localhost: 8081 in Firefox
Access localhost: 8081 in Firefox. 8081 is because I specified "-p 8081: 80" in docker run.
<a href="https://ebios10.up.seesaa.net/image/2020-10-21_172725.png " target="_blank"><img border="0" alt="2020-10-21_172725.png " src="https://ebios10.up.seesaa.net/image/2020-10-21_172725-thumbnail2.png " width="640" height="498"></a>
I was able to confirm that Caddy was working without any problems.
Starting Caddy with docker was easy, without any stumbling blocks.
# Location of Caddy config file and index.html
Nothing happened until Caddy started, so touch the Caddy container a little and check the location of the Caddy configuration file and index.html.
```# docker exec -it testcaddy /bin/ash```
```# cd /etc/caddy```
```# ls```
```# cat caddyfile```
<a href="https://ebios10.up.seesaa.net/image/2020-10-21_180526.png " target="_blank"><img border="0" alt="2020-10-21_180526.png " src="https://ebios10.up.seesaa.net/image/2020-10-21_180526-thumbnail2.png " width="608" height="541"></a>
#### **`# Set this path to your site's directory.`**
root * /usr/share/caddy
Is set.
# cd /usr/share/caddy
# ls
# cat index.html
<a href="https://ebios10.up.seesaa.net/image/2020-10-21_180618.png " target="_blank"><img border="0" alt="2020-10-21_180618.png " src="https://ebios10.up.seesaa.net/image/2020-10-21_180618-thumbnail2.png " width="410" height="147"></a>
I was able to confirm that index.html exists under / usr / share / caddy as set.
If you want to try Caddy, it seems easy and good to do it with docker.
Recommended Posts