Create Kubernetes cluser using gcloud

Login to gcloud with

Set default region

To create a cluser, run

To create a cluster with 2 nodes, run

To specify compute engine type during cluster creation, run

You can also specify scopes, this allow you to give the cluster permission to access other google cloud resources. For example […]

Read More…

Docker Nginx Proxy

Docker Nginx Proxy allow you to run multiple docker containers on same server behind nginx proxy. This is done using https://github.com/jwilder/nginx-proxy To do this, you need a server with port 80 and 443 unused. To setup nginx proxy, run following

This will start nginx proxy. You can modify .env file if you want. Starting […]

Read More…

Docker Build

Build a docker container with Apache docker build command is used to create a docker image from Dockerfile. To create an image, first lets create a working directory and change to the directory.

Create a file with name Dockerfile

Put following content in it

Now build the docker image with

This […]

Read More…

docker search

docker search command allows you to search for images in docker hub. Example

To see results with 4 or more stars, use

docker […]

Read More…

portainer – Web based UI for Docker

Portainer is a web based UI for managing docker. https://portainer.io/ You can run it with command

Now login to portainer with url http://YOUR_SERVER_IP:9000 docker […]

Read More…

Docker detach container

Docker container stop once the main program it started with stop running. If you start a docker container with console using -ti option, it stop when you disconnect. To avoid process getting stopped, you can detach from the console. This is done by pressing keys

Followed by

You can just press CTRL key, […]

Read More…

docker images

docker images command list all docker images (blueprints) available on your server.

[…]

Read More…