You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an interesting pattern that shows up in several of our internal applications, especially those using Go or Rust. In particular, we have two Dockerfiles:
Dockerfile.build contains a complete development toolchain, which may be several hundred megabytes in size, and which may rely on a full-fledged distro like Ubuntu. We use this image to build a statically-linked binary.
Dockerfile contains a minimalistic Alpine image. We simply drop our static binary into this image, and the result is often less than 30MB in size.
We may want to make this pattern "official", and provide support for handling it automatically when we invoke cage build.
A possible design
The design could be fairly simple. We might just add something like the following to an individual service:
We want to support this, and it should work just fine for ordinary builds. cage test, however, might be a bit more complicated, and we need to think it through.
There's an interesting pattern that shows up in several of our internal applications, especially those using Go or Rust. In particular, we have two
Dockerfile
s:Dockerfile.build
contains a complete development toolchain, which may be several hundred megabytes in size, and which may rely on a full-fledged distro like Ubuntu. We use this image to build a statically-linked binary.Dockerfile
contains a minimalistic Alpine image. We simply drop our static binary into this image, and the result is often less than 30MB in size.We may want to make this pattern "official", and provide support for handling it automatically when we invoke
cage build
.A possible design
The design could be fairly simple. We might just add something like the following to an individual service:
...or perhaps instead to
config/sources.yml
:Then we could simply define a
Dockerfile.prebuild
in the source directory.The text was updated successfully, but these errors were encountered: