Comments (3)
Hey, thanks for suggestion. I new about these extra rules but I haven't tried them. I have just tried and here is what I found:
- it is cool that I don't need to maintain distroless base layer sha
- Gazelle still generates
go_binary
rule and ifgo_image
hasname=smith
then they conflict. - If I change
name=smith_container
ongo_image
to avoid the conflict then it works but now I have two rules - just like before :) - I need an ability to run the binary. I usually build it and then run it (I don't use
bazel run
for this). This becomesbazel-bin/cmd/smith/smith_container.binary
vsbazel-bin/cmd/smith/smith
. It's a bit uglier and, which is more important, more magical - it is not obvious what is that.binary
and there is no way to know it exists without looking at the rule implementation.
So given the above I think it is unlikely I'll use it unless there is a way to improve the user experience somehow.
from smith.
Yeah, I have a bug open against Gazelle. This came up here so I may augment the surface of language rules that don't benefit from layering to also accept the binary target directly.
(to elaborate a bit) For Go there is less benefit than with languages like Python and Java where we can intelligently factor layers (you can see some commentary on this here and here). Eventually I'd like to make this more intelligent and less manual.
I'll open an FR on rules_docker
to track this for now.
it is cool that I don't need to maintain distroless base layer sha
Even if you don't use go_image
, you can get the benefit of this by using the following symbol for your base
image: https://github.com/bazelbuild/rules_docker/blob/master/go/image.bzl#L59-L64 This has the benefit of putting busybox
into containers built with -c dbg
:)
Mostly I wanted to reach out and make sure you were aware of the option. If you run into any problems, please don't hesitate to reach out.
from smith.
I think this should get you what you want.
Let me know if you run into any trouble using it.
from smith.
Related Issues (20)
- Label inheritance does not play well with metadata.generation HOT 1
- Improve print crd command
- Remove compatibility block
- Check the namespace in the produced spec is empty or set to the bundle namespace in a webhook HOT 1
- Switch to k8s.io/yaml HOT 1
- Replace k8s.io/apimachinery/pkg/util/diff with github.com/google/go-cmp/cmp
- Add ability to disable LastAppliedReplicas on Deployment
- Support immediate deletion of no longer referenced bundle resources
- Use Kind for CI HOT 1
- Potential ServiceIntstance issue
- Reprocess Bundles with Deployments when referred Secret/ConfigMaps change
- Hash only referenced keys HOT 1
- References in resource status
- Propagate events Secret -> ServiceInstance/ServiceBinding -> Bundle
- Package with constants for object kinds, etc
- Run Service Catalog integration tests in CI HOT 1
- Is smith ready for public consumption? HOT 7
- Add support for immutable Kubernetes resource kinds
- Is Service Catalog required? HOT 1
- Remove reference to dep in README HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smith.