What goes in <version> in my yaml?

running in docker:

caddy:
image: caddy:
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- /home/mike/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- /home/mike/docker/caddy:/srv
- caddy_data:/data
- caddy_config:/config

volumes:
caddy_data:
caddy_config:

All I can find is to use the image

well it won’t let me input this for some reason. it was caddy: < version > which can’t be right. what is the version?

. Well, that can’t be right. What is the actual syntax?

You pick a tag from the list available here Docker Hub at the top of the documentation

Typically best to start with the latest stable version. In this case, 2.4.0.

Thank you for your reply!

I got an error with:

caddy:
image: caddy:2.4.0
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- /home/mike/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config:

Error was:
mike@ubuntumedia:~/docker$ docker-compose up -d
Pulling caddy (caddy:2.4.0)…
2.4.0: Pulling from library/caddy
ERROR: no matching manifest for linux/amd64 in the manifest list entries
mike@ubuntumedia:~/docker$

I also tried 2.4.0-alpine which gave me:

Pulling caddy (caddy:2.4.0-alpine)…
2.4.0-alpine: Pulling from library/caddy
ERROR: no matching manifest for linux/amd64 in the manifest list entries

Wait about an hour and try again. v2.4.0 just got released, so I think Docker Hub’s servers are still in the process of building all the different variants of the docker images.

I’m having restart issues now. I posted a new thread, complete with details and I filled out the form :slight_smile:

This topic was automatically closed after 30 days. New replies are no longer allowed.