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
Hey - I'm a bazel noob, so apologies for the question, but I'm trying to produce a container image with my rails project using these rules and I'm stuck.
I have a ruby_binary package in my BUILD (largely cribbed from the examples/simple_rails_api dir) which builds successfully. But I'm then coming up dry getting that into a runnable container. I've looked at py_binary for inspiration, but there seems to be a py_image (https://github.com/bazelbuild/rules_docker#py_image) rules_docker rule that does the work for that. How can I go about doing it with container_layer and container_image rules? Is the idea that the ruby_binary produces a binary that requires no other deps?
The text was updated successfully, but these errors were encountered:
robertgates55
changed the title
Clarification - using generated files in container images
Clarification - using generated ruby_binary in container image
Mar 7, 2021
Ruby binary most definitely will need dependencies.
It's possible we would have to implement a similar to Python rule ruby_image to build docker image with all the dependencies.
You may be able to do the packaging of all dependencies using a genrule that executes a shell script to create a dockerfile in the root of runfiles for your target and build the container there.
To be honest i am not super familiar with the container rules.
Hey - I'm a bazel noob, so apologies for the question, but I'm trying to produce a container image with my rails project using these rules and I'm stuck.
I have a
ruby_binary
package in myBUILD
(largely cribbed from theexamples/simple_rails_api
dir) which builds successfully. But I'm then coming up dry getting that into a runnable container. I've looked atpy_binary
for inspiration, but there seems to be apy_image
(https://github.com/bazelbuild/rules_docker#py_image)rules_docker
rule that does the work for that. How can I go about doing it withcontainer_layer
andcontainer_image
rules? Is the idea that theruby_binary
produces a binary that requires no other deps?The text was updated successfully, but these errors were encountered: