mailcatcher icon indicating copy to clipboard operation
mailcatcher copied to clipboard

implement full docker build

Open mblaschke opened this issue 2 years ago • 4 comments

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 avatar Jul 17 '22 19:07 mblaschke

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

mblaschke avatar Jul 17 '22 20:07 mblaschke

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.

sj26 avatar Jul 18 '22 00:07 sj26

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 avatar Jul 19 '22 18:07 mblaschke

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.

mblaschke avatar Jul 23 '22 18:07 mblaschke