Skip to content
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

How about docker image? #21

Open
drakulis opened this issue Jun 9, 2023 · 4 comments
Open

How about docker image? #21

drakulis opened this issue Jun 9, 2023 · 4 comments

Comments

@drakulis
Copy link

drakulis commented Jun 9, 2023

Hi,

I'm wondering if you can provide docker image were spanner-dump is already installed?

I'm not go-lang developer. I'm trying to install it using instructions from readme file but it doesn't seem work for me. All I get is an error/warning during installation and spanner doesn't seem to be installed.

obraz

I have also installed newer Go (1.20) and used following command:

go install github.com/cloudspannerecosystem/spanner-dump@latest

This time installation ended up successfully but spanner-dump command is still unavailable 😞
obraz

@yfuruyama
Copy link
Collaborator

go install installs the command in $GOPATH/bin directory. So to use the installed command, you need to set a PATH for $GOPATH/bin directory.

Here is the example:

$ go env GOPATH
/some/directory/go

$ export PATH=$PATH:/some/directory/go/bin

@drakulis
Copy link
Author

drakulis commented Jun 9, 2023

@yfuruyama
Thank you very much! It works now. I mean I can execute command.

Could you guide me how to dump spanner data from emulator? It seems spanner-dump tries to dump "real" spanner data.
I do not see any parameter where i can set up spanner url. I've tried to set it up via

gcloud config set api_endpoint_overrides/spanner http://spanner:9020/

but is still doesn't work.

Maybe I'm mixing something... I'm pretty new to Spanner.

@yfuruyama
Copy link
Collaborator

No problem at all. If you need to use Spanner Emulator, please try to set SPANNER_EMULATOR_HOST environment variable before running spanner-dump command. Reference: https://cloud.google.com/spanner/docs/emulator#client-libraries

Sorry for not documenting well, but spanner-cli has a relevant document, so please take a look at this as well: https://github.com/cloudspannerecosystem/spanner-cli#using-with-the-cloud-spanner-emulator

@drakulis
Copy link
Author

drakulis commented Jun 9, 2023

It works!!! Thank you very much for your support!

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

No branches or pull requests

2 participants