Giter Club home page Giter Club logo

cloud-sdk-docker's People

Contributors

ahmetb avatar amalhotragannett avatar anindyatahsin avatar bendory avatar bobidle avatar catchyzheng avatar cglouch avatar cloudsdkdocker avatar dependabot[bot] avatar dlorenc avatar erjohnso avatar euank avatar gerbercj avatar hdubin avatar jacek-marchwicki avatar jameslynnwu avatar liuchaoren avatar mattmoor avatar maythazin5 avatar natlooney avatar proppy avatar remcohaszing avatar s4shyam95 avatar salrashid123 avatar skelterjohn avatar svalentin avatar tswast avatar victor23d avatar willfaris avatar yonathanzetune avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-sdk-docker's Issues

Duplicate sources.list entry

While building manually we get:

W: Duplicate sources.list entry http://gce_debian_mirror.storage.googleapis.com/ wheezy/main amd64 Packages (/var/lib/apt/lists/gce%5fdebian%5fmirror.storage.googleapis.com_dists_wheezy_main_binary-amd64_Packages)
W: You may want to run apt-get update to correct these problems

Bigtable Emulator image

It would be useful for testing if the bigtable emulator were distributed as an image. Something along the lines of:

FROM google/cloud-sdk

EXPOSE 8086

CMD ["gcloud", "beta", "emulators", "bigtable", "start"]

gsutil cp missing crcmod

Hi,

i used gsutil cp and got these warning. Is there any chance to install
the missing pip to improve the performance and make this warning
go away?
I can try to fix it, if you would accept the PR.

Thx in advance

meno

cloud shell gcloud compute ssh

What needs to be done to get 'gcloud compute ssh' in the docker container to auto-authenticate when run from cloud shell?

Passing in --net=host -e DEVSHELL_CLIENT_PORT=$DEVSHELL_CLIENT_PORT gets it to generate an SSH key, but then it asks for a password (unlike when I run gcloud compute ssh directly within cloud shell)

failed to access google-cloud-datastore inside docker

I try to start the cloud-datastore emulator inside docker with command below, seems I can't access it from the host machine

 docker run -p 8000:8000 --name gcd google/cloud-sdk gcloud beta emulators datastore start --project=pi-docker --host-port 127.0.0.1:8000 --no-store-on-disk

the docker image can start without problem. , but when I try go access it from host machine, it get empty response,and our google datastore java client can't communicate with the docker instance via port 8000

curl localhost:8000
curl: (52) Empty reply from server

docker container log below.

Executing: /google-cloud-sdk/platform/cloud-datastore-emulator/cloud_datastore_emulator create --project_id=pi-docker /.config/gcloud/emulators/datastore
[datastore] Sep 20, 2016 4:22:23 AM com.google.cloud.datastore.emulator.CloudDatastore$CreateAction$1 apply
[datastore] INFO: Provided project_id to Cloud Datastore emulator create command, which is no longer necessary.
[datastore] Created new Cloud Datastore project in '/.config/gcloud/emulators/datastore'.
Executing: /google-cloud-sdk/platform/cloud-datastore-emulator/cloud_datastore_emulator start --host=127.0.0.1 --port=8000 --store_on_disk=False --consistency=0.9 --allow_remote_shutdown /.config/gcloud/emulators/datastore
[datastore] Sep 20, 2016 4:22:23 AM com.google.cloud.datastore.emulator.CloudDatastore$FakeDatastoreAction$7 apply
[datastore] INFO: Provided --allow_remote_shutdown to start command which is no longer necessary.
[datastore] Sep 20, 2016 4:22:23 AM com.google.cloud.datastore.emulator.impl.LocalDatastoreFileStub <init>
[datastore] INFO: Local Datastore initialized:
[datastore]     Type: High Replication
[datastore]     Storage: In-memory
[datastore] Sep 20, 2016 4:22:23 AM io.grpc.internal.ManagedChannelImpl <init>
[datastore] INFO: [ManagedChannelImpl@1409d7f5] Created with target 127.0.0.1:8000
[datastore] Sep 20, 2016 4:22:24 AM io.gapi.emulators.netty.NettyUtil applyJava7LongHostnameWorkaround
[datastore] INFO: Applied Java 7 long hostname workaround.
[datastore] API endpoint: http://127.0.0.1:8000
[datastore] If you are using a library that supports the DATASTORE_EMULATOR_HOST environment variable, run:
[datastore] 
[datastore]   export DATASTORE_EMULATOR_HOST=127.0.0.1:8000
[datastore] 
[datastore] Dev App Server is now running.
[datastore] 

inside docker container, it has no problem at all to access the service

 docker exec -it gcd wget localhost:8000
converted 'http://localhost:8000' (ANSI_X3.4-1968) -> 'http://localhost:8000' (UTF-8)
--2016-09-20 04:48:16--  http://localhost:8000/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8000... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3
Saving to: 'index.html'

index.html                                   100%[==============================================================================================>]       3  --.-KB/s   in 0s     

2016-09-20 04:48:16 (30.7 KB/s) - 'index.html' saved [3/3]

Cooler name: google/gcloud

IMO a better name for this image would be google/gcloud on Docker Hub.

cloud-builders already use gcr.io/cloud-builders/gcloud and gcr.io/cloud-builders/gsutil (same image, different ENTRYPOINT).

This is more of a branding discussion but I'd love to see what you think of a shorter/more precise name. When the industry says SDK they usually mean something different than what we mean. SDK means client libraries, tools, compilers etc, whereas our Google Cloud SDK consists of only 2 CLI tools. But I digress. Thoughts?

Delete unused branches

1st party developers must not create developer branches on the main repository as all forks also get these for no reason. Developers of the project must fork to their personal area and send PRs.

image

'compute ssh' gives error

With the latest build executing docker run -ti google/cloud-sdk:latest gcloud compute --project ... returns error ERROR: (gcloud.compute.ssh) Your platform does not support SSH.

Bigtable component not installed

refs #42

Attempting to run the bigtable emulator results in this warning:

You cannot perform this action because this Cloud SDK installation is 
managed by an external package manager.  If you would like to get the 
latest version, please see our main download page at:

https://cloud.google.com/sdk/

ERROR: (gcloud.beta.emulators.bigtable.start) The component manager is disabled for this installation

I believe the bigtable component is missing from the Dockerfile, and will be fixed by this patch: master...timkaye11:master

Some Components Not Installed in `latest` Image

The Readme states that all components are installed in the latest version of the image (as opposed to the slim or alpine versions). Running a fresh image shows that some components are not installed in the image, such as kubectl and docker-gcr-credential-helper for example.

As expected, components cannot be installed into the container after startup.

Tims-MacBook-Pro-15:~ timfall$ docker run -i -t --name google -v /root/.config google/cloud-sdk
root@59f399a68bb8:/# gcloud components list

Your current Cloud SDK version is: 165.0.0
The latest available version is: 165.0.0

+-------------------------------------------------------------------------------------------------------------+
|                                                  Components                                                 |
+---------------+------------------------------------------------------+--------------------------+-----------+
|     Status    |                         Name                         |            ID            |    Size   |
+---------------+------------------------------------------------------+--------------------------+-----------+
| Not Installed | Cloud Datastore Emulator (Legacy)                    | gcd-emulator             |  38.1 MiB |
| Not Installed | Emulator Reverse Proxy                               | emulator-reverse-proxy   |  14.5 MiB |
| Not Installed | Google Container Local Builder                       | container-builder-local  |   3.6 MiB |
| Not Installed | Google Container Registry's Docker credential helper | docker-credential-gcr    |   2.2 MiB |
| Not Installed | kubectl                                              | kubectl                  |  16.0 MiB |
| Installed     | App Engine Go Extensions                             | app-engine-go            |  98.0 MiB |
| Installed     | BigQuery Command Line Tool                           | bq                       |   < 1 MiB |
| Installed     | Cloud Bigtable Command Line Tool                     | cbt                      |   4.1 MiB |
| Installed     | Cloud Bigtable Emulator                              | bigtable                 |   3.5 MiB |
| Installed     | Cloud Datalab Command Line Tool                      | datalab                  |   < 1 MiB |
| Installed     | Cloud Datastore Emulator                             | cloud-datastore-emulator |  15.4 MiB |
| Installed     | Cloud Pub/Sub Emulator                               | pubsub-emulator          |  21.0 MiB |
| Installed     | Cloud SDK Core Libraries                             | core                     |   6.4 MiB |
| Installed     | Cloud Storage Command Line Tool                      | gsutil                   |   3.0 MiB |
| Installed     | Default set of gcloud commands                       | gcloud                   |           |
| Installed     | gcloud Alpha Commands                                | alpha                    |   < 1 MiB |
| Installed     | gcloud Beta Commands                                 | beta                     |   < 1 MiB |
| Installed     | gcloud app Java Extensions                           | app-engine-java          | 128.1 MiB |
| Installed     | gcloud app Python Extensions                         | app-engine-python        |   6.5 MiB |
+---------------+------------------------------------------------------+--------------------------+-----------+
To install or remove components at your current SDK version [165.0.0], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [165.0.0], run:
  $ gcloud components update

root@59f399a68bb8:/# gcloud components update
You cannot perform this action because this Cloud SDK installation is 
managed by an external package manager.  If you would like to get the 
latest version, please see our main download page at:
  
https://cloud.google.com/sdk/

ERROR: (gcloud.components.update) The component manager is disabled for this installation

kubectl no longer preinstalled

Recent changes seem to no longer include kubectl. This breaks our CI which relied on kubectl being present:

docker run --rm -it google/cloud-sdk
Unable to find image 'google/cloud-sdk:latest' locally
latest: Pulling from google/cloud-sdk
6f821164d5b7: Pull complete 
5d7c6e9ed739: Pull complete 
Digest: sha256:e9e9b8d6c760a4fbfe28a17606b566f4522b5d9226cca9cbcde157fa82d0154f
Status: Downloaded newer image for google/cloud-sdk:latest
/ # kubectl
/bin/sh: kubectl: not found
/ # gcloud components list | grep kubectl

Your current Cloud SDK version is: 159.0.0
The latest available version is: 159.0.0

| Not Installed | kubectl | ...

It seems like others have the same problem as well (081fa06#commitcomment-22619593). The same behavior occurs for older gcloud versions (I built images using CLOUD_SDK_VERSION 150.0.0 and 155.0.0 exemplarily).

Is this intended behavior or will this be fixed in a future version?

error in alpine image

When using the alpine image, I see the following logs:

You do not currently have this command group installed.  Using it
requires the installation of components: [beta]


Your current Cloud SDK version is: 174.0.0
Installing components from version: 174.0.0

+---------------------------------------------+
|     These components will be installed.     |
+----------------------+------------+---------+
|         Name         |  Version   |   Size  |
+----------------------+------------+---------+
| gcloud Beta Commands | 2017.09.15 | < 1 MiB |
+----------------------+------------+---------+

For the latest full release notes, please visit:
  https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)?
ERROR: (gcloud) This prompt could not be answered because you are not in an interactive session.  You can re-run the command with the --quiet flag to accept default answers for all prompts.

Deleting Image from GCR returns code 1 which crashes CI

yes Y | gcloud container images delete gcr.io/awesome-project/example-image
Executing this command will result in a return code of 1 instad of 0 even if the command succeeded.
When this is used in CI, the CI pipeline will stop because of this.

Also, can gcloud container images delete support non-interactive(unattended) way to delete an image?

Using `gcloud preview docker` fails

Given there's no docker client installed on the container. I normally have to resort to running a new container, installing docker, committing/tagging as a new image and run off of that image instead of the original when in need to run gcloud preview docker commands.

It would be nice if either the image already included docker or at least instructions were provided for people to do it in case they need it.

Python and Java GAE apps access the same local dev server datastore

Does the latest Google Cloud SDK enable Python and Java GAE apps to access the same local dev server and datastore?

Earlier this year @proppy said, "gcd.sh wraps the Java App Engine development server, so you can't currently share data between an App Engine Python development environment and a Cloud Datastore development environment: see #21."

Yesterday I asked about this in the #google-containers IRC channel, and ~isdal chimed in to say this is now possible -- "The new gcloud SDK allows you to run multiple docker containers at the same time with all of them sharing the same datastore (and other APIs)."

If so, what dev server do you run and how do you configure the Docker apps?

Have a root Dockerfile

@salrashid123 we should have a preferred Dockerfile on the repository root. Currently it's not clear which one is the preferred one. We can do this by symlinking. Can you send a patch? Sorry I didn't catch this during the code review.

ERROR: Reachability Check failed.

For some reason, I can't get the google-cloud-sdk library to make any API requests against gcloud. The minimum reproduction steps for me look like this:

$ docker run -it google/cloud-sdk gcloud init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
ERROR: Reachability Check failed.
    Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (ServerNotFoundError)
    Cannot reach https://www.googleapis.com/auth/cloud-platform (ServerNotFoundError)
    Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (ServerNotFoundError)
Network connection problems may be due to proxy or firewall settings.


Do you have a network proxy you would like to set in gcloud (Y/n)?  n

ERROR: Network diagnostic (0/1 checks) failed.

This is just the bare minimum, I'm trying to set up a more sophisticated container but can't get any of the commands that hit the gcloud API to succeed. (eg: gcloud components list, bq ls, etc) They all fail with similar ServerNotFoundError errors.

I am not behind a proxy or anything, as I get the same result at the office and at home. Also, when I create an image from this container and then access the shell I can ping the above hosts just fine.

Publish with version tag

Please publish next releases also with particular version tag, not just latest, to have ability to fixate it in config.

Problem connecting container from host

It seems that I can't connect running goapp serve inside container from host.

Steps to reproduce:

  1. Download and extract appengine-try.go.zip:
$ wget -O appengine-try-go.zip "https://cloud-playground.appspot.com/_ah/mimic/ziprepo?repo=repos/appengine-try-go&filename=appengine-try-go.zip"
$ unzip appengine-try-go.zip
  1. Run docker container serving go application:
$ docker run --rm -ti -v $(pwd)/appengine-try-go:/app/ -p 8080:8080 -p 8000:8000 google/cloud-sdk goapp serve /app/
  1. Try to connect to running application from host:
$ wget -O- http://localhost:8080/
--2014-10-24 23:13:45--  http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.
…
  1. Try to connect to running application inside container
$ docker exec <CONTAINER_ID> wget -qO- http://localhost:8080/
Hello, world!

Rebase published CloudSDK Dockerfile and dockerhub image

The existing Dockerfile for this repo uses a base from appengine:

FROM gcr.io/google_appengine/base

Propose updating the base image to Alpine and also documenting SDK install Dockerfiles for centos/ubuntu

The changes would

  • Reduce the footprint by not including appengine-specific dependencies from the existing base
  • Reduce the footprint by not install all gcloud subcomponents. Instead users can extend the basic source.
  • Preserve the existing volume mounts

NOTE: This image is also built automatically on push to dockerhub:

Anyone automatically downloading that image will see a new base and lack of post-base install gcloud components.

The image based on google_appengine/base will no longer get updated as latest but would remain static at the version the time of switch over is done to tag: google/cloud-sdk:appengine

Sample alpine based Dockerfile

FROM alpine
RUN apk add --update curl python bash &&  rm -rf /var/cache/apk/*
ENV HOME /
RUN curl https://sdk.cloud.google.com | bash

ENV PATH /google-cloud-sdk/bin:$PATH
VOLUME ["/.config"]
CMD ["/bin/bash"]

For comparison of baseline alpine, ubuntu, centos vs pre-packaged image based on appengine:

REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
google/cloud-sdk                       latest              a1e753da8f5b        3 weeks ago         1.143 GB
salrashid123/cloud-sdk-docker          alpine              cc66a1c1e5c4        2 weeks ago         235.5 MB
salrashid123/cloud-sdk-docker          centos              99f52928e785        2 weeks ago         411.8 MB
salrashid123/cloud-sdk-docker          ubuntu              ae332b8fe5d2        2 weeks ago         383.7 MB

The generated images for SDK 147 taken from here

I'll file a PR to update the Dockerfile in this repo to Alpine (thereby also trigger dockerhub rebuild) as well as document the centos/ubuntu Dockerfiles. Will submit PR on 5/15

Pls chime in if there are objections.

Error when trying to use `gcloud auth activate-service-account `

ERROR: (gcloud.auth.activate-service-account) PyOpenSSL is not available. If you have already installed PyOpenSSL, you will need to enable site packages by setting the environment variable CLOUDSDK_PYTHON_SITEPACKAGES to 1. If that does not work, See https://developers.google.com/cloud/sdk/crypto for details.

Latest image not working in GCE with scopes

On a host with Scope enabled for storage in GCE, it throws:

You are attempting to perform an operation that requires a project id, with none configured. Please re-run gsutil config and make sure to follow the instructions for finding and entering your default project id.

Then running gsutil config outputs that it is no longer needed. It looks like the image changed sometime today on Dockerhub. Anything new that needs to be done that isn't documented yet?

Moving To Alpine and Back to Jessie?

A Few days ago, you made the switch to alpine linux as a base image, as it was notified on the docker hub. And now you switched back without noticing anyone to alpine?

And the alpine image isn't pushed to the registry.

we can clearly see the problem by looking at the Dockerfile from here https://hub.docker.com/r/google/cloud-sdk/builds/buybneabmhnqd2stdafxhgv/ and here https://hub.docker.com/r/google/cloud-sdk/builds/buybneabmhnqd2stdafxhgv/

Is this expected?

error: You must be logged in to the server (the server has asked for the client to provide credentials)

Since this morning we get these errors when trying to use kubectl from this container:

$ echo $SERVICE_ACCOUNT_JSON > key-file.json
$ gcloud auth activate-service-account --key-file key-file.json --project application-europe
Activated service account credentials for: [deployment-from-gitlab@application-europe.iam.gserviceaccount.com]
$ gcloud container clusters get-credentials application-beta --zone europe-west1-d
Fetching cluster endpoint and auth data.
kubeconfig entry generated for application-beta.
$ kubectl replace -f application-webapp-frontend-deployment.yml
error: You must be logged in to the server (the server has asked for the client to provide credentials)

Could this be because of an update of this docker image?

Beta command group not installed

I see the alpine version of the Dockerfile has been published. The pre-alpine version used to have the beta components installed, can this also be the default for the alpine version?

$ docker run -it google/cloud-sdk:latest /bin/bash
bash-4.3# gcloud beta emulators pubsub start
You do not currently have this command group installed.  Using it 
requires the installation of components: [beta]


Your current Cloud SDK version is: 159.0.0
Installing components from version: 159.0.0

ERROR: (gcloud) Your current working directory is inside the Cloud SDK install root: /google-cloud-sdk.  In order to perform this update, run the command from outside of this directory.

add .ssh volume

Which would be very useful for GCE and avoids regenerating new SSH keys in

gcloud compute --project REDACTED ssh ctrexporter-live --quiet --command 'hostname'

apt-get update fails with 503 service unavailable

Hi,
The command 'apt-get update' errors with 503 Service Unavailable from local machine, however works fine on GCE and GAE. Wasn't sure if this was intended. My unit tests fail because of this error. Wondering if we could get an explain. Thanks!

Trace:
Step 4 : RUN apt-get update
---> Running in 36449fba4b2c
Ign http://gce_debian_mirror.storage.googleapis.com jessie InRelease
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://gce_debian_mirror.storage.googleapis.com jessie-updates InRelease
Ign http://gce_debian_mirror.storage.googleapis.com jessie Release.gpg
Ign http://gce_debian_mirror.storage.googleapis.com jessie-updates Release.gpg
Ign http://gce_debian_mirror.storage.googleapis.com jessie Release
Ign http://gce_debian_mirror.storage.googleapis.com jessie-updates Release
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [216 kB]
Ign http://gce_debian_mirror.storage.googleapis.com jessie/main amd64 Packages/DiffIndex
Ign http://gce_debian_mirror.storage.googleapis.com jessie-updates/main amd64 Packages/DiffIndex
Err http://gce_debian_mirror.storage.googleapis.com jessie/main amd64 Packages
503 Service Unavailable
Err http://gce_debian_mirror.storage.googleapis.com jessie-updates/main amd64 Packages
503 Service Unavailable
Fetched 279 kB in 4s (62.2 kB/s)
W: Failed to fetch http://gce_debian_mirror.storage.googleapis.com/dists/jessie/main/binary-amd64/Packages 503 Service Unavailable

W: Failed to fetch http://gce_debian_mirror.storage.googleapis.com/dists/jessie-updates/main/binary-amd64/Packages 503 Service Unavailable

E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100

Thanks!

Include the docker client binary in images (for gcloud docker commands)

The cloud-sdk docker images provide access to the gcloud commands. However, they don't provide a good mechanism for executing the gcloud docker subcommand which is handy for downloading docker images from gcr.io more easily.

I've presented the two options we can recommend users take in order to successfully run the gcloud docker subcommands. I've included the good and bad of each.

Based on the below, I'd like to recommend that the cloud-sdk image, in both the debian and alpine variants, include the latest "stable" docker client binary in the image itself.
I'm happy to do the work required for that myself if you agree that's the right path.
I think the good/bad descriptions below adequately explain why I think this is a good idea.

1. Bindmount in the host's docker client

Right now, the accepted way to do this, as best I can tell, is bindmount in the host's docker client binary. A full command to do a gcr pull looks like the following:

$ docker run -v $HOME/.config/gcloud:/root/.config/gcloud \
                     -v /var/run/docker.sock:/var/run/docker.sock \
                     -v /usr/bin/docker:/usr/bin/docker \
                     google/cloud-sdk  docker -- pull gcr.io/google_containers/pause

The good

  • This works on some distros!
  • The daemon and client will have matching versions
  • Small cloud-sdk image size

The bad

  • Doesn't work with the alpine cloud-sdk on gibc distros with dynamically linked docker clients (aka almost all distros).
  • Doesn't work on Fedora 26, even with the debian based cloud-sdk image
    docker: error while loading shared libraries: libltdl.so.7: cannot open shared object file: No such file or directory
    
  • Requires the user to do an extra bindmount in addition to the docker socket

2. Include a client binary for the latest 'stable' docker version

The image itself could provide the client portion of the docker package.

This will result in a user running a command like the following:

$ docker run -v $HOME/.config/gcloud:/root/.config/gcloud \
                     -v /var/run/docker.sock:/var/run/docker.sock \
                     google/cloud-sdk  docker -- pull gcr.io/google_containers/pause

The good

  • Will work regardless of the host distro (musl / glibc mixing and matching fine)
  • Easier command for the user to type
  • If the user runs the command from option 1, it will still work just as well or badly as before (e.g. this option doesn't prevent users from using 1 if they want the good from it)

The bad

  • Increases image size by 20MB or so
  • The client and server versions will generally not be identical
    Note, however, that each docker daemon supports multiple 'api versions', and the docker client makes an attempt to negotiate the correct api version. Given the only operation here is 'pull', this difference should be fairly harmless.

unable to run `gcloud auth activate-service-account`

I get this error while trying to run gcloud auth activate-service-account

ERROR: (gcloud.auth.activate-service-account) PyOpenSSL is not available. If you have already installed PyOpenSSL, you will need to enable site packages by setting the environment variable CLOUDSDK_PYTHON_SITEPACKAGES to 1. If that does not work, see https://developers.google.com/cloud/sdk/crypto for details or consider using .json private key instead.

I think this is related to the following
#21
#22

Missing gnupg ?

I don't know what I'm doing, but when I tried adding the root directory Dockerfile to another Debain derived one, it gave this error complaining about no gnupg

Installed /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
Collecting crcmod
  Downloading crcmod-1.7.tar.gz (89kB)
Installing collected packages: crcmod
  Running setup.py install for crcmod: started
    Running setup.py install for crcmod: finished with status 'done'
Successfully installed crcmod-1.7
�[91m �[0m�[91m % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0�[0m�[91m
100   663  100   663    0     0  16091      0 --:--:-- --:--:-- --:--:-- 16170
�[0m�[91mE: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

I added it to the initial apt-get and it now works:

ENV CLOUD_SDK_VERSION 167.0.0

RUN apt-get -qqy update && apt-get install -qqy \
        curl \
        gcc \
        python-dev \
        python-setuptools \
        apt-transport-https \
        lsb-release \
        openssh-client \
        git \
        gnupg \
    && easy_install -U pip && \
...etc...

kubectl missing from new image

Hi,

I just found out the image changed causing my deployments to fail since it requires kubectl which is missing from the current image.

Is this intended by design ?

Thanks.

Include app-engine-php

In the current version of Cloud SDK (100.0.0), app-engine-php is not included by default.

However, when I attempt to install manually with gcloud components install app-engine-php, the component manager has been disabled:

ERROR: (gcloud.components.install) The component manager is disabled for this installation

Could app-engine-php be added to the Dockerfile, as app-engine-python and app-engine-java are?

Cannot install components via gcloud on newest build anymore (159.0.0, latest)

% docker run --rm -it google/cloud-sdk:159.0.0-slim /bin/bash
root@59f492e3dbcf:/# gcloud components install kubectl
You cannot perform this action because this Cloud SDK installation is
managed by an external package manager.  If you would like to get the
latest version, please see our main download page at:

https://cloud.google.com/sdk/

ERROR: (gcloud.components.install) The component manager is disabled for this installation

used to work on previous version (now named legacy).

Can use apt-get directly for kubectl of course, but it's a bit odd, given this is the official image.

Use --volume $HOME/.config instead of --volumes-from

I am opening this issue to see if people are interested in suggesting users something like:

alias gcloud="docker run --rm -it -v $HOME/.config/:/.config/ -v /:/rootfs gcloud"

Instead of doing the named-container and --volumes-from dance.

I am trying to get this idea to work but I am confused that when I login, I don't see $HOME/.config/ in docker diff results. It also looks like there are other paths the gcloud state is stored, such as $HOME/.boto and $HOME/.gsutil/. If everything was under one place (e.g. $HOME/.config/gcloud) there would be no need to run a gcloud init container and installation/usage would be as simple as creating an alias.

Thoughts?

cc: @tswast @salrashid123

install kubectl fails

Hello,

I'm running the latest version of the image google/cloud-sdk:159.0.0 or using google/cloud-sdk

And gcloud components install kubectl fails with

You cannot perform this action because this Cloud SDK installation is
managed by an external package manager. If you would like to get the
latest version, please see our main download page at:

https://cloud.google.com/sdk/

ERROR: (gcloud.components.install) The component manager is disabled for this installation

gcloud components install kubectl -q --no-user-output-enabled doesn't help

gcloud components list gives this

Your current Cloud SDK version is: 159.0.0
The latest available version is: 159.0.0

+-------------------------------------------------------------------------------------------------------------+
| Components |
+---------------+------------------------------------------------------+--------------------------+-----------+
| Status | Name | ID | Size |
+---------------+------------------------------------------------------+--------------------------+-----------+
| Not Installed | Cloud Bigtable Command Line Tool | cbt | 4.1 MiB |
| Not Installed | Cloud Datastore Emulator (Legacy) | gcd-emulator | 38.1 MiB |
| Not Installed | Emulator Reverse Proxy | emulator-reverse-proxy | 14.5 MiB |
| Not Installed | Google Container Registry's Docker credential helper | docker-credential-gcr | 2.2 MiB |
| Not Installed | kubectl | kubectl | 14.9 MiB |
| Installed | App Engine Go Extensions | app-engine-go | 97.0 MiB |
| Installed | BigQuery Command Line Tool | bq | < 1 MiB |
| Installed | Cloud Bigtable Emulator | bigtable | 3.5 MiB |
| Installed | Cloud Datalab Command Line Tool | datalab | < 1 MiB |
| Installed | Cloud Datastore Emulator | cloud-datastore-emulator | 15.4 MiB |
| Installed | Cloud Pub/Sub Emulator | pubsub-emulator | 21.0 MiB |
| Installed | Cloud SDK Core Libraries | core | 6.2 MiB |
| Installed | Cloud Storage Command Line Tool | gsutil | 2.9 MiB |
| Installed | Default set of gcloud commands | gcloud | |
| Installed | gcloud Alpha Commands | alpha | < 1 MiB |
| Installed | gcloud Beta Commands | beta | < 1 MiB |
| Installed | gcloud app Java Extensions | app-engine-java | 132.2 MiB |
| Installed | gcloud app Python Extensions | app-engine-python | 6.4 MiB |
+---------------+------------------------------------------------------+--------------------------+-----------+

The expected behaviour is to install the kubectl command, isn't it?

Thanks,
Valentin

Tag releases of Docker images with versions

Latest happens to be erroring for me (looks like something in kubectl 1.2 is busted: it expects json when ~/.kube/config is actuall yaml). Would be convenient to use 1.1.

Debian 9 as base

Are there plans to upgrade to debian:stretch as base by chance? Python 2.7.9 included with jessie is somewhat dated now and compiling 2.7.13 from scratch followed by make altinstall is painful.

Thank you

New Issue - Affecting Datalab

Thought it was something I did, but suddenly I can't pull the datalab image.

gcloud docker pull gcr.io/cloud-datalab/datalab-gateway

Produces:

ERROR: (gcloud.docker) unrecognized arguments:
  pull
  gcr.io/cloud-datalab/datalab-gateway

Looks like someone had a bad line somewhere...

Components cloud-datastore-emulator and app-engine-go not installed

README.md says

google/cloud-sdk is a Docker image bundling all the components and dependencies of the Google Cloud SDK including alpha and beta components.

However, google/cloud-sdk image is missing the components app-engine-go and cloud-datastore-emulator.

docker run google/cloud-sdk gcloud components list                            

Your current Cloud SDK version is: 119.0.0
The latest available version is: 119.0.0

+------------------------------------------------------------------------------------------+
|                                        Components                                        |
+---------------+-----------------------------------+--------------------------+-----------+
|     Status    |                Name               |            ID            |    Size   |
+---------------+-----------------------------------+--------------------------+-----------+
| Not Installed | Cloud Datastore Emulator          | cloud-datastore-emulator |  16.1 MiB |
| Not Installed | gcloud app Go Extensions          | app-engine-go            |   1.5 MiB |
| Installed     | BigQuery Command Line Tool        | bq                       |   < 1 MiB |
| Installed     | Cloud Datastore Emulator (Legacy) | gcd-emulator             |  38.1 MiB |
| Installed     | Cloud Pub/Sub Emulator            | pubsub-emulator          |  10.8 MiB |
| Installed     | Cloud SDK Core Libraries          | core                     |   4.0 MiB |
| Installed     | Cloud Storage Command Line Tool   | gsutil                   |   2.6 MiB |
| Installed     | Default set of gcloud commands    | gcloud                   |           |
| Installed     | gcloud Alpha Commands             | alpha                    |   < 1 MiB |
| Installed     | gcloud Beta Commands              | beta                     |   < 1 MiB |
| Installed     | gcloud app Java Extensions        | app-engine-java          | 131.0 MiB |
| Installed     | gcloud app Python Extensions      | app-engine-python        |   7.2 MiB |
| Installed     | kubectl                           | kubectl                  |   8.2 MiB |
+---------------+-----------------------------------+--------------------------+-----------+
To install or remove components at your current SDK version [119.0.0], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [119.0.0], run:
  $ gcloud components update

Trying to install them results in an error:

docker run google/cloud-sdk gcloud components install cloud-datastore-emulator

You cannot perform this action because this Cloud SDK installation is 
managed by an external package manager.  If you would like to get the 
latest version, please see our main download page at:

https://cloud.google.com/sdk/

ERROR: (gcloud.components.install) The component manager is disabled for this installation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.