sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.3k stars 575 forks source link

implement full docker build #514

Open mblaschke opened 2 years ago

mblaschke commented 2 years ago

Full docker based build which could be used in github actions

The build step is split in two parts and to make the final image as small as possible. I'm not that familiar with ruby so there might be a possibility to build the gem with all dependencies in the build step so there would be no need to add more dependencies in the final image.

I've tested the build with native docker build . (single arch image) run and with docker buildx build --platform linux/amd64,linux/arm64 . (multi-arch image)

Question was raised in https://github.com/sj26/mailcatcher/issues/497

mblaschke commented 2 years ago

Do you also need/want a docker github action workflow?

sj26 commented 2 years ago

Hiya! I don't think this is building the frontend assets required. And it won't be using the signed gem. Is there a benefit to moving away from the simple gem install?

I would love a github workflow that builds a docker image for new github releases, using the released gem binary.

mblaschke commented 2 years ago

maybe have a look at https://github.com/webdevops/azure-metrics-exporter/blob/main/.github/workflows/release-docker.yml

this is a pipeline to build multi-arch images

mblaschke commented 2 years ago

hm.. i'm thinking about the signed package but not sure it this is a real benefit when shipping docker images.

it would make more sense to sign the docker image at all, not just a part of it which you cannot check it when running the image.

singing the package makes more sense if you install it from via package system, but here we're going to ship even the runtime and the gem is just a small part of it. signing the docker image is a different topic and a lot of people doesn't check these signatures.

it would enable you to build a docker image for every commit in main so people can easily try them and give feedback.