I combined the auto-setup and server dockerfiles to work around an issue with (as far as I can tell) docker buildx bake and ENTRYPOINTs in multi-stage builds.
I also added a simple test to CI that ensures our images work
Why?
docker buildx bake doesn't seem to let you override the entrypoint of the current build context, so when we changed to using a bakefile we broke the auto-setup image. We can work around this by combining the two into a single multi-stage dockerfile and picking the target we want to build separately.
I added two new stages to the server dockerfile to handle this:
server - the server itself without the auto-setup stuff. This is equivalent to what the server.Dockerfile would build prior to this change
auto-setup - this is the server-with-auto-setup image
What was changed
I combined the auto-setup and server dockerfiles to work around an issue with (as far as I can tell)
docker buildx bake
and ENTRYPOINTs in multi-stage builds.I also added a simple test to CI that ensures our images work
Why?
docker buildx bake
doesn't seem to let you override the entrypoint of the current build context, so when we changed to using a bakefile we broke the auto-setup image. We can work around this by combining the two into a single multi-stage dockerfile and picking the target we want to build separately.I added two new stages to the server dockerfile to handle this:
server
- the server itself without the auto-setup stuff. This is equivalent to what the server.Dockerfile would build prior to this changeauto-setup
- this is the server-with-auto-setup image