Docker authentication with GCP from R

  Kiến thức lập trình

I’ve built a docker image from R via the terminal (docker build -t penguins .)

When I try to run the image via the terminal (docker run --rm -e .Renviron -p 8000:8000 penguins)

I’ve passed in my .Renviron file which contains my environmental variables (GCE_AUTH_FILE) which points to my service account json file.

When I run the docker image I receive the following error pointing to a missing .httr_auth file however when I run httr::with_verbose(googleAuthR::gar_auth_service(json_file = Sys.getenv("GCE_AUTH_FILE"))) I get a http 200 which is good news

I’m confused what needs to be done to get authenticated from within the docker image.

Any suggestions would be greatly appreciated

enter image description here

1

LEAVE A COMMENT