Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Failed to start container: invalid reference format

I'm trying to test out the example at https://cloud.google.com/compute/docs/instances/create-start-instance

 

```

  1. In the Google Cloud console, go to the VM instances page.

    Go to VM instances

  2. Select your project and click Continue.

  3. Click Create instance.

  4. Specify a Name for your VM. For more information, see Resource naming convention.

  5. In the Container section, click Deploy container.

    1. Specify the Container image to use. For example:

      • To select an NGINX 1.12 container image from Cloud Launcher:

        gcr.io/cloud-marketplace/google/nginx1:1.12

      • To deploy an Apache container image from Docker Hub, always specify the full Docker image name:

        docker.io/httpd:2.4

    2. Optional: Click Advanced container options. For more information, see Configuring options to run your container.

  6. To create the VM, boot the VM, and launch the container, click Create.

```

 

If I use `gcr.io/cloud-marketplace/google/nginx1:1.12`, then I get the following error:

```

#########################[ Error ]#########################
# The startup agent encountered errors. Your container #
# was not started. To inspect the agent's logs use #
# 'sudo journalctl -u konlet-startup' command. #
###########################################################

```

Checking the logs:

```

Sep 19 21:05:15 nginx konlet-startup[632]: 2023/09/19 21:05:15 Pulling image: ' gcr.io/cloud-marketplace/google/nginx1:1.12'
Sep 19 21:05:15 nginx konlet-startup[632]: 2023/09/19 21:05:15 Error: Failed to start container: invalid reference format

```

 

Are the docs at https://cloud.google.com/compute/docs/instances/create-start-instance incorrect?

1 2 1,583
2 REPLIES 2

Hi @nick-youngblut,

Welcome to the Google Cloud Community!


I have replicated the steps provided in the "Create a VM instance from a container image" in the official documentation and also encountered the same error as yours.

Sep 21 20:04:09 instance-2 konlet-startup[495]: 2023/09/21 20:04:09 Pulling image: 'gcr.io/cloud-marketplace/google/nginx1:1.12'
Sep 21 20:04:09 instance-2 konlet-startup[495]: 2023/09/21 20:04:09 Error: Failed to start container: Error response from daemon: {"message":"manifest for gcr.io/cloud-marketplace/google/nginx1:1.12 not found: manifest unknown: Failed


Based on the logs, there might be an issue pulling the image from Google Container Registry (GCR). We can verify this by navigating to the container image link.

As you can see from the image below, the image nginx 1:12 doesn't exist.

image-error.png

To answer your question, the document is outdated. As of September 22, 2023, the latest image of nginx that you can use is:

gcr.io/cloud-marketplace/google/nginx1:1.25


I successfully recreated the VM with this image version.

Let me know if you encounter any issues.

Thanks @lawrencenelson !

I'm running into this problem of the Docker container continually restarting for many containers that I try (e.g., https://hub.docker.com/r/nextflow/nextflow or even `ubuntu:20.04`). Do you have any idea on why this is occurring?