Reputation: 25
I have a docker image on the container registry of google. The issue i'm facing is that it I do not see an option to add docker run-type arguments like: --detached
I would run my container by calling
docker run -t -d -p 3333:3333 -p 3000:3000 --name <name> <image_ID>
Im using a VM instance on Gcloud and the container option seems to not have this detached argument (which is killing my ubuntu-based container from stopping when not used). Both using the Computing Engine OS and Google Cloud Run service option eventually results in an error.
Upvotes: 0
Views: 247
Reputation: 40296
Your question lacks detail. Questions benefit from details including the specific steps that were taken, the errors that resulted or the steps that were taken to diagnose the error etc.
I assume from your question that you're using Cloud Console to create a Compute Engine instance and your're selecting "Container" to deploy a container image to it.
The default configuration is to run the container detached i.e. equivalent to docker run --detach
.
You can prove this to yourself by SSH'ing in to the instance and running e.g. docker container ls
to see the running containers or docker container ls --all
to see all containers (stopped too).
You can also run the container directly from here too as you would elsewhere although you may prefer to docker run --interactive --stdin
or docker container logs ...
to determine why it's not starting correctly :
docker run \
--stdin \
--detach \
--publish=3333:3333 \
--publish=3000:3000 \
--name=<name> \
<image_ID>
Upvotes: 1