Skip to content
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

Support language-specific build tools #11902

Open
mejedi opened this issue Jun 13, 2024 · 0 comments
Open

Support language-specific build tools #11902

mejedi opened this issue Jun 13, 2024 · 0 comments

Comments

@mejedi
Copy link

mejedi commented Jun 13, 2024

Description

Recently several language-specific build tools emerged. These tools produce a container image without having to write a Dockerfile. Golang has ko-build. Java got something as well.

(Besides convenience, a strong selling point is efficiency. For instance, ko produces multi-arch images by leveraging cross-compilation support in Golang toolchain. It also takes advantage of different caches in the host, such as module and build caches. Golang workspaces work seamlessly with ko. Finally, if dependencies in private repositories are required, enabling access in a Dockerfile is an annoyance. Eliminated with ko.)

It would be nice if build: section in docker-compose.yaml was extended to support these language-specific builders.

One way to do it would be piggy-backing on existing build: URL syntax. If a schema is not http(s), like e.g. ko://example.org/foo/bar, look for docker-compose-build-<SCHEMA> in PATH. Pass example.org/foo/bar as an argument to docker-compose-build-ko and extract image ID from command's stdout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant