-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fix the auto-setup image and test images in CI #175
Conversation
`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: 1. `server` - the server itself without the auto-setup stuff. This is equivalent to what the server.Dockerfile would build prior to this change 2. `auto-setup` - this is the server-with-auto-setup image
COMPOSE_PROJECT_NAME=temporal | ||
CASSANDRA_VERSION=3.11 | ||
ELASTICSEARCH_VERSION=8.0.0 | ||
MYSQL_VERSION=8 | ||
POSTGRESQL_VERSION=13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might have missed it; what step uses this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are default values used by docker-compose
@@ -0,0 +1,68 @@ | |||
version: "3.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess docker-compose repo should be included as submodule here, to make it nice.
@@ -1,26 +0,0 @@ | |||
ARG GOPROXY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long time ago we had one Dockerfile
. Then I split it "per image". There was a good reason for it, but I couldn't recall. Why do you merging them back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Buildx won't let you override the entrypoint the way we needed to in a multi-stage build. I don't recall why (it's been a month), but it doesn't let you do it.
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