If I follow the instructions at https://cloud.google.com/compute/docs/instances/create-start-instance for creating an instance with a container:
```
In the Google Cloud console, go to the VM instances page.
Select your project and click Continue.
Click Create instance.
Specify a Name for your VM. For more information, see Resource naming convention.
In the Container section, click Deploy container.
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
Optional: Click Advanced container options. For more information, see Configuring options to run your container.
To create the VM, boot the VM, and launch the container, click Create.
```
...but I use `ubuntu:22.04` (or a similar public container) I cannot run `docker attach`, because that always produces the error:
```
You cannot attach to a restarting container, wait until it is running
```
However, the docker container continuously restarts every ~1 minute.
Regardless of the Docker image (public or on Artifact Registry) and the VM config parameters that I use, the docker container in my running VM continuously restarts. The VM logs do not indicate why this is occurring.
I'm surprised that there isn't more troubleshooting documentation on this, given how easy it has been for me to come across this issue (basically every container & VM setup that I've tried).
Hi @nick-youngblut,
Welcome to Google Cloud Community!
Based on the instructions you followed on this link
I can give you notes needed to be reviewed before deploying your instance
You can refer to this image as a reference:
Regarding the restarting container during startup of the instance, you can modify the instance by following these steps
I hope this information is helpful. Please let me know if you have any other questions.
"always specify the full Docker image name"
Even at https://hub.docker.com/_/ubuntu/tags?page=1&name=22.04, the full image name is not used: `docker pull ubuntu:22.04`, so how is the user supposed to know that the full image name should be used ("docker.io/ubuntu:22.04")?