bazels3cache
bazels3cache copied to clipboard
Run in the foreground
I'm trying to run this process in a docker container, but it keeps killing the container because the essential process exits when bazels3cache goes to the background. Is there a possibility of running this process in the foreground?
@exchgr I tried this and it works in my kubernetes deployment:
command:
- sh
- -c
- "/usr/bin/bazels3cache --bucket=some-bucket-for-bazelcache --logging.file=/dev/null && while sleep 3600; do :; done"
When I tried with "/usr/bin/bazels3cache --bucket=some-bucket-for-bazelcache --logging.file=/dev/null && cat
, my container kept crashing. Since, I am running with alpine, sleep infinity
isn't available to me.
For what it's worth.
And don't forget --host 0.0.0.0
. This took me a long time to realize. By default, it only mounts to localhost
, which makes pod / service traffic work, but fails for ingresses.
This is my final command in k8s podSpec:
command:
- sh
- -c
- "/usr/bin/bazels3cache --host=0.0.0.0 --logging.file=/dev/stdout --bucket=some-bazelcache && tail -f /dev/null"