gcloud ERROR: (gcloud.app.deploy) Error Response: [3] - docker

After running gcloud app deploy i am having the next error trying to deploy my application to a container using gcloud and the google cloud API.
Step 5 : CMD npm start
---> Running in cb3b29e90183
---> 296d95a6ac52
Removing intermediate container cb3b29e90183
Successfully built 296d95a6ac52
PUSH
The push refers to a repository [us.gcr.io/<ID_PROJECT>/appengine/default.20160906t225412] (len: 1)
296d95a6ac52: Preparing
296d95a6ac52: Pushing
296d95a6ac52: Pushed
d6a5f487b829: Preparing
d6a5f487b829: Pushing
d6a5f487b829: Pushed
b71be5d9c21a: Preparing
b71be5d9c21a: Pushing
b71be5d9c21a: Pushed
75d5a58c171b: Preparing
75d5a58c171b: Pushing
75d5a58c171b: Pushed
9ff051f37ab2: Image already exists
363507e00b22: Image already exists
818131a74c7c: Image already exists
cc57a274adf5: Image already exists
c7c7a273971f: Image already exists
b21b3e3bc691: Image already exists
latest: digest:sha256:70668fb04a90187c890eb6ba3119b6af46838a5518f7a96e8996f1d5fda6dc52 size: 33255
DONE
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [3] Docker image us.gcr.io/<PROJET_ID>/appengine/default.20160906t225412:latest was either not found, or you do not have access to it.
I just recently updated my google cloud SDK from the version 122.0.0 to the version 124.0.0 I am running this in my local machine mac environment, this is the complete version's list:
gcloud --version
Google Cloud SDK 124.0.0
bq 2.0.24
bq-nix 2.0.24
core 2016.08.29
core-nix 2016.08.29
gcloud
gsutil 4.21
gsutil-nix 4.21

I found the error and the solution, apparently the gcloud SDK version upgrade, from 122.0.0 to 124.0.0 got corrupted my project id in the gcloud portal.
I tried to switch back from 124.0.0 to 122.0.0 unsuccessfully and also upgrade again to 126.0.0, but finally I found that creating a new project and migrating all my containers made the trick and once there everything worked correctly!.
I have to say it, gcloud is a very useful and powerful tool, but with an error like this and finding out that there is actually few support provide it from Google makes me think to move back to AWS.

App Engine no longer supports Docker V1 format images for new deployments. It looks like the error message used doesn't really convey this.
Here are the docs on how to tell which docker format an image is in:
https://cloud.google.com/container-registry/docs/ui
We'll work on getting the error message fixed. Sorry about the hassle.

Related

.NetCore Api Docker Image is not working when pulled from DockerHub

Created a .net core (3.1) API which depends on MongoDB and created a docker image for this project (which is working fine in my system). I am pushing this image to a private repository.
When pulling the image from another system/host/machine, The image is not working and giving error exited with code 0
I am very new to Docker and not finding how to pull the image to a new system and start using it.
Below are the steps I did.
Using Docker-Compose.yml to create supported images.
these are the images created in my system.
Commands I am using to tag the image and push
docker tag 9aa28f48b025 myusername/reponame
docker push myusername/reponame
Commands I am using to pull in another system.
docker login -- (using credentials)
docker pull myusername/reponame
Is my understanding of reusing images wrong? Any reference or suggestion will be a great help

codeship stuck using old image of codeship/google-cloud-deployment

I've been updating one of our projects that is built and deployed using codeship pro. We use codeship/google-cloud-deployment docker image to deploy google cloud functions. I need features that are only available in a recent version of the gcloud sdk, but codeship always uses an old version the sdk and seems stuck fetching a cached version of the image.
codeship-services.yml
googlecloudproductiondeployment:
image: codeship/google-cloud-deployment
encrypted_env_file: deploy/deploy-production.env.encrypted
cached: false
volumes:
- ./:/deploy
codeship-steps.yml
- name: Deploy CF to prod
tag: ^deploy-production$
service: googlecloudproductiondeployment
command: /deploy/deploy/google-deploy-cf.sh
deploy/google-deploy-cf.sh
#!/bin/bash
set -e
PROJECT=my-project
FUNCTION_NAME=my-function
SOURCE_REPO=my-repo
# Authenticate on google SDK
codeship_google authenticate
# Re-deploy the CF
gcloud version
gcloud beta functions deploy $FUNCTION_NAME --region europe-west1 --runtime nodejs8 --env-vars-file /deploy/deploy/cf-env.production.yaml --trigger-http --source https://source.developers.google.com/projects/my-project/repos/${PROJECT}/fixed-aliases/${CI_BRANCH} --memory 128MB --entry-point run --timeout 540s
Output observed in codeship:
googlecloudproductiondeployment build/pull started
googlecloudproductiondeployment build/pull finished successfully
googlecloudproductiondeployment Activated service account credentials for: [***#***.iam.gserviceaccount.com]
googlecloudproductiondeployment Google Cloud SDK 204.0.0
googlecloudproductiondeployment alpha 2017.09.15
googlecloudproductiondeployment beta 2017.09.15
googlecloudproductiondeployment bq 2.0.34
googlecloudproductiondeployment core 2018.06.04
googlecloudproductiondeployment gsutil 4.31
googlecloudproductiondeployment kubectl
googlecloudproductiondeployment deployng
googlecloudproductiondeployment ERROR: (gcloud.beta.functions.deploy) unrecognized arguments: 2018-10-08 07:42:29 googlecloudproductiondeployment --runtime (did you mean '--timeout'?)
googlecloudproductiondeployment nodejs8
googlecloudproductiondeployment --env-vars-file
googlecloudproductiondeployment /deploy/deploy/cf-env.production.yaml
Expected output:
I expect to see Google Cloud SDK 218.0.0, the version noted in the last commit in codeship's google-cloud-deployment github repo.
Steps tried:
Adding :latest to the image in codeship-services.yml.
Clicking on Reset Cache on the project page on codeship.
Even after reseting the cache, I always see Image exists, using cached image in the logs for my googlecloudproductiondeployment service on codeship.
Using jet locally, I can fore codeship to pull the latest version by running docker rmi codeship/google-cloud-deployment before jet steps. However, I do not have control over the docker cache on codeship.
It seems codehip is stuck using an old version of the codeship/google-cloud-deployment image. On docker hub this image has no tags other than latest, so I don't know how to force codeship to get a specific version. Please help!
Apologies for the trouble.
We've gone ahead and ensured that versions of codeship/google-cloud-deployment will remain current.
In general we will be tracking behind the most current Google Cloud SDK by two to three weeks. But this will maintain much closer parity to most recent versions. We can also expedite updates of Google Cloud SDK now as needed.
If you reset your project cache and restart your build, you will note (as of this time of writing) that the Google Cloud SDK is now set to version 219.0.1 for the codeship/google-cloud-deployment image.

Google Cloud Container Registry Issues while pushing docker images

I have a Google project on which i am one of the owner. It was created by another developer and he added me as the owner. Now within that i created a VM instance within which i installed docker. After installing docker, i created an image of my node.js application by providing the git repository as the argument.
However after setting the gcloud config parameters, its giving me 500 error while trying to push that docker image
Error: Status 500 trying to push repository <project-id>/<image-name>: "Internal Error."
My gcloud and docker version information :-
Google Cloud SDK 0.9.71
Docker version 1.7.1, build 786b29d
you probably were hit by the Google Cloud Storage outage that was going on last night: https://status.cloud.google.com/incident/storage/16027
would you mind trying again?
Sorry for the inconvenience!
Jeffrey van Gogh
Google Container Registry Team

can't build the docker image with error saying image not found

I am trying to build a docker image from public repository. Actually I had built it successfully before, today I wanted to update the image to latest one, so I removed the older image, and tried to pull the new image.
However, when I tried
$ docker pull dockerfile/ghost
Pulling repository dockerfile/ghost
FATA[0001] Error: image dockerfile/ghost:latest not found
I can't really understand why it doesn't work, it is supposed to be working.
This is what you need
Use docker pull ghost.
Thanks, #Chandan. I followed his advice to find the problem through
docker logs container_id
Firstly, the error is
ERROR: casper cannot be activated because it is not currently
installed.
so I downloaded the casper and put it into the theme folder.
Secondly, the error is
Migrations: Up to date at version 003 Ghost is running in
development... Listening on 127.0.0.1:2368 Url configured as:
http://localhost:2368
because the ghost server is running in the development mode.so I make it as production mode.
Thirdly, by making it into the production mode, there is a error
ERROR: Unable to access Ghost's content path:
so I followed the instruction to edit /path/to/ghost/blog/config.js and copy the paths section from development to production. Then restart the container.
docker restart some-ghost
at last it works
Replace
docker pull dockerfile/ubuntu
with
docker pull ubuntu
Similarly in Dockerfile for base image pull, replace
FROM dockerfile/ubuntu
with
FROM ubuntu
Change ubuntu to any other image name you require

docker push gives Failed to upload

I am using docker on Ubuntu 12.04. I used docker 0.7.2 modified a container that I created with docker 0.7.1, and when I tried to commit the changes to the container, I got this Failed to upload error (tried twice):
avilella#ubuntu64:~/src/docker$ sudo docker push avilella/basespace-playground
The push refers to a repository [avilella/basespace-playground] (len: 1)
Sending image list
Pushing repository avilella/basespace-playground (1 tags)
5c7f024259a7: Image already pushed, skipping
[...]
04869f04a8c9: Pushing 2.601 MB/16.55 MB 2m16s
[...]
2014/01/02 23:16:54 Failed to upload layer: Put https://registry-1.docker.io/v1/images/cdf6082e5d472d18c0540c43224f4c9b8d1264a2bb3c848a5b5e5a3b00efbf1a/layer: archive/tar: invalid tar header
Any ideas?
I upgraded Docker from 0.7.3 to 0.7.5 and this error stopped.
ALSO POSTED ON GITHUB ISSUE:
I don't have the time to go through a lot of code now, if one of the dev's doesn't get on it I'll look into it later, but it appears to be an issue or change with the registry archive auto-detection settings, or tar file headers being used, probably changed in the new version you are using.
SEE SIMILAR ISSUE:
http://lists.busybox.net/pipermail/busybox/2011-February/074737.html
If there is not too much work you did on the new layer, I would pull your previous docker push, from the registry, and redo the new layer work, then push it. You probably, did not pull from the registry, but built the new layer upon the last commit (locally) and that had different headers. It is probably a good idea, whenever you upgrade to push your work first, then upgrade, then pull and continue working from that pull as things like this can happen where headers and such are different in versions. Hope that helps.
This got fixed in today's version of docker (obtained via apt-get in my case).

Resources