-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Badger storage does not start in docker #1543
Comments
Where does it get /go/bin/data from? I thought it defaults to temp. |
I haven't looked into it. There is probably a bug. |
You set the ephemeral to false, thus it doesn't write to /tmp by default, but to: defaultDataDir := getCurrentExecutableDir()
defaultValueDir = "/data/values"
defaultKeysDir = "/data/keys"
ValueDirectory: defaultDataDir + defaultValueDir,
KeyDirectory: defaultDataDir + defaultKeysDir, Keeping |
@burmanm, the Docker run command then should specify a volume to be mounted at |
In the case of It fails even in ephemeral mode:
|
Couldn't get it to work either:
It yields:
|
I got it working with below command docker run Thanks @yurishkuro for pointers. |
Was YOUR_LOCAL_DIR your GOPATH, or just any local directory that you have mounted? |
Despite @srispl's success in getting it to work, I think there's something that could improve the usability. Docker supports mounting with --tmpfs option that would mount the host's tmpfs to the docker container. This is something badger backend should definitely use when ephemeral is true. I'll investigate tomorrow if there's a sane way to improve support when running in the container (as I did the development outside the container). |
Let's keep this open and make it work when |
I think it works just fine if you configure your Docker correctly:
Docker when ran with defaults is just picky and forbids using tmpfs. |
I am wondering if the pre-creation if the temp dir would also solve the problem as it fails on |
I didn't realize GH now closes issues when a PR is merged in another repo. |
@bharadwr It can be any path in your Local/VM. I have tested in my local by pointing to some X location and also mounted a volume on VM and tested. |
@pavolloffay I did not created any directories except pointing to valid location when mounting a location. |
Yeah, I would like to make it work without mounting in ephemeral mode. |
Signed-off-by: Michael Burman <[email protected]>
I was able to manage it by passing the user and group ids to the container this way:
I hope it helps! |
The text was updated successfully, but these errors were encountered: