Create a new Google Compute Engine (GCE) instance:
- Go to your Google Cloud Platform console
- Create a new Google Compute Engine, with Debian 8 or Linux distort of your choice.
- Give it a name
- Choose a zone
- Choose a machine type
- Allow HTTP traffic
- Click “Create”
- SSH into your new Google Compute Engine
Install Docker on your new Google Compute Engine Machine:
- Login as super user
- sudo -s
- Run the following command to install docker
- sudo apt-get install docker.io
- Docker is now ready!
- Test docker
- docker ps
Build your docker image on your new Google Compute Engine machine:
- Pull your docker image that has been pushed to the cloud, in either a private or public repository
- docker pull <your username>/<app name>
- docker run -p 80:7777 -d <your username>/<app name>
Access your new machine:
Open the following IP in your browser [your new google cloud machine IP]
Install cURL on your machine if it doesn’t have it already:
- apt-get update
- apt-get install curl
- Create an image of your new machine so that you can use it later.
- Don’t forget to login to Docker on your new GCE if you are trying to access a private image.