Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distill to single Dockerfile #8

Merged

Conversation

hairyhenderson
Copy link
Contributor

@hairyhenderson hairyhenderson commented Oct 30, 2019

This does a few things:

  • removes the templated Dockerfiles (hardcoding makes it simpler for Renovate to automatically pick up base image updates)
  • brings the 2 (alpine and scratch) variants together into a single Dockerfile (just build with --target to differentiate)
  • moves the Dockerfile to the root of the repo to make the docker build command a bit simpler
  • adds some standard OCI labels (Fixes Add LABELS instructions #4)
  • adds an entrypoint script to the alpine variant so that non-caddy commands can be run more easily
  • sets up some custom build-phase hook scripts to run in the (not-yet-set-up) Automated Build to be set up in DockerHub
  • adds a simple GitHub Action to make sure the images build successfully

This doesn't:

  • update the Taskfile.yml - I'm not familiar with that so much so I'll need to defer to @Ilyes512 on that (or we could drop that entirely since the hook/build script handles the build)
  • do anything that's covered by WIP: Create and use caddy user instead of root #6 - hopefully it's not too difficult to merge those changes in as part of a follow-up PR

Signed-off-by: Dave Henderson [email protected]

@hairyhenderson
Copy link
Contributor Author

The Action ran, but because this came from my fork it ran in my fork: https://github.com/hairyhenderson/caddy-docker/commit/9045ec2fa1b015ea1baf17feb9713edddf922bcc/checks?check_suite_id=287357456 (tl;dr: it passes 😅)

@hairyhenderson
Copy link
Contributor Author

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
docker-entrypoint.sh Outdated Show resolved Hide resolved
hooks/build Outdated Show resolved Hide resolved
hooks/build Outdated Show resolved Hide resolved
hooks/post_push Outdated Show resolved Hide resolved
Signed-off-by: Dave Henderson <[email protected]>
@hairyhenderson hairyhenderson merged commit 1774c88 into caddyserver:master Nov 1, 2019
@hairyhenderson hairyhenderson deleted the simplify-dockerfile branch November 1, 2019 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add LABELS instructions
3 participants