-
Notifications
You must be signed in to change notification settings - Fork 53
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
github: rework Docker build, and publish new images #489
base: main
Are you sure you want to change the base?
github: rework Docker build, and publish new images #489
Conversation
✅ Deploy Preview for fb-oss-glean canceled.
|
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.
LGTM, thanks for doing this!
@@ -132,9 +132,18 @@ cxx-libraries: | |||
cxx-test-%: force | |||
@$(MAKE) -f mk/cxx.mk --no-print-directory CXX_MODE=$(CXX_MODE) CXX_DIR=$(CXX_DIR) $@ | |||
|
|||
GLEAN_CABAL_BINS=glean glean-server glean-hyperlink | |||
GLEAN_NATIVE_LIBS=librocksdb.so.8 libfolly.so.0.58.0-dev libfmt.so.11 |
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.
this looks fragile, can we make it independent of the version numbers?
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.
Maybe we can just do librocksdb.so.*
or something like that and let bash
do the rest of the magic for us
Note that this still needs to actually push the images to the Docker registry, so it's not quite ready yet. |
b2dc3a0
to
31bf67a
Compare
This reworks the `Dockerfile` to now build multiple images, including one for end users to run their own copy of Glean, and an updated version of the React demo database. It includes x86_64 and aarch64 Linux images using public GHA runners, which probably covers 98% of all realistic uses. (Using GHA runners means this workflow is trivially usable for public forks, too.) There is a new `bindist` target used by the Dockerfile that creates a directory of needed binaries and libraries, and properly packages them for usage in the container. There are now three containers published from the `Dockerfile`, all based on Ubuntu 24.04: - `glean/client`, which only contains the `glean` command, then - `glean/server`, including `glean-server`, then - `glean/demo`, including a precanned `glean-hyperlink` + react DB These containers are all size-optimized; the final images have no development tools installed and the absolute minimum necessary installed packages. For example, the new x86_64 `glean/demo` is only 486MB uncompressed, compared to the 2.4GB of the previous demo version. The `client` and `server` images are 251MB and 300MB, respectively. The `client` image should probably include `gen-schema` so that end users can generate code from their own non-upstream `.angle` files, but that can be added in a future patch. In theory, this new container could also be used to replace most of the junk in `ci.yml` in order to repeat ourselves less, but it would need another image in order to add more things so that the test suite can be run. That can happen in a future patch. Signed-off-by: Austin Seipp <[email protected]>
31bf67a
to
925fd19
Compare
This reworks the
Dockerfile
to now build multiple images, including one for end users to run their own copy of Glean, and an updated version of the React demo database. It includes x86_64 and aarch64 Linux images using public GHA runners, which probably covers 98% of all realistic uses. (Using GHA runners means this workflow is trivially usable for public forks, too.)There is a new
bindist
target used by the Dockerfile that creates a directory of needed binaries and libraries, and properly packages them for usage in the container.There are now three containers published from the
Dockerfile
, all based on Ubuntu 24.04:glean/client
, which only contains theglean
command, thenglean/server
, includingglean-server
, thenglean/demo
, including a precannedglean-hyperlink
+ react DBThese containers are all size-optimized; the final images have no development tools installed and the absolute minimum necessary installed packages. For example, the new x86_64
glean/demo
is only 486MB uncompressed, compared to the 2.4GB of the previous demo version. Theclient
andserver
images are 251MB and 300MB, respectively.The
client
image should probably includegen-schema
so that end users can generate code from their own non-upstream.angle
files, but that can be added in a future patch.In theory, this new container could also be used to replace most of the junk in
ci.yml
in order to repeat ourselves less, but it would need another image in order to add more things so that the test suite can be run. That can happen in a future patch.