Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Wednesday, January 22, 2020

Docker - Install nginx


Download, install and start a container running NGINX

$ sudo docker run --detach --name web nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
8ec398bc0356: Pull complete
dfb2a46f8c2c: Pull complete
b65031b6a2a5: Pull complete
Digest: sha256:80a88760216ae16b13d9a9ce0267740d2de3506cbf1cab29072b1532dedd1ecb
Status: Downloaded newer image for nginx:latest
11292f469c3db9b1a1ec66cf46d5133803be823bbd89e91613d39133757436a1



Check if nginx process has started

$ ps aux | head -1; ps aux | grep nginx
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      7632  0.1  0.0  10632  5540 ?        Ss   12:18   0:00 nginx: master process nginx -g daemon off;
systemd+  7691  0.0  0.0  11088  2664 ?        S    12:18   0:00 nginx: worker process







Check Docker running Process:

$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
11292f469c3d        nginx:latest        "nginx -g 'daemon of…"   2 hours ago         Up 2 hours          80/tcp              web





Tuesday, August 27, 2019

Docker Compose - Install in Ubuntu

To install Docker, please refer to the previous blogpost:
https://sashankexpresstech.blogspot.com/2019/08/docker-install-on-ubuntu.html

Installing Docker Compose in Ubuntu Linux:


Step 1: Download Docker Compose from GitHub repository:
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Step 2:  Provide the execute permission:
sudo chmod +x /usr/local/bin/docker-compose

Step 3: Create a shortcut:
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose


Check the Installation:

$ docker-compose -version
docker-compose version 1.24.1, build 4667896b



Tuesday, August 20, 2019

Docker - Install on Ubuntu


Repositories of Docker for Ubuntu Bionic are available at:
https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/


In order to install docker community edition on Ubuntu Bionic - I used the following steps:

  • wget -c https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/containerd.io_1.2.6-3_amd64.deb
  • wget -c https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce-cli_19.03.1~3-0~ubuntu-bionic_amd64.deb
  • wget -c https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.1~3-0~ubuntu-bionic_amd64.deb





  • sudo dpkg -i containerd.io_1.2.6-3_amd64.deb
  • sudo dpkg -i docker-ce-cli_19.03.1~3-0~ubuntu-bionic_amd64.deb
  • sudo dpkg -i docker-ce_19.03.1~3-0~ubuntu-bionic_amd64.deb




References:
https://docs.docker.com/install/linux/docker-ce/ubuntu/