Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Run in the foreground #21

Open
exchgr opened this issue Oct 23, 2019 · 2 comments
Open

Run in the foreground #21

exchgr opened this issue Oct 23, 2019 · 2 comments
Assignees

Comments

@exchgr
Copy link

exchgr commented Oct 23, 2019

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?

@charandas
Copy link

@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.

@charandas
Copy link

charandas commented Nov 8, 2019

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"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants