I've read here that I can use the gcloud
sdk to create an instance from a container image. Here's how they say to do for nginx.
gcloud alpha compute instances create-from-container nginx-vm \
--docker-image=gcr.io/google-containers/nginx:latest \
--port-mappings=80:80:TCP
I'd like to be able to do this with a node image i've made. I can run it locally using docker run -p 49160:8080 -d myusername/node-web-app
, but I don't understand where the image is. Is the idea that I can just scp the image to the VM I have running on cloud compute, and then use a snippet like the one above? How can I find this image in order to do that? This question indicates that they are located at /Users/MyUserName/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2, The listing there doesn't look very promising:
- .
- ..
- Docker.qcow2
- console-ring
- console-ring.0
- console-ring.1
- console-ring.2
- console-ring.3
- console-ring.4
- console-ring.5
- hypervisor.pid
- lock
- log
- mac.0
- nic1.uuid
- pid
- syslog
- tty -> /dev/ttys000