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/

Wednesday, August 7, 2019

Python3 - Ubuntu - Apache - Access Anaconda python library from apache

The apache server has its own path. To make change to the PATH variable, we need to change in the file: /etc/apache2/envvars

$ sudo vi /etc/apache2/envvars


At the end of this file. I added the path of anaconda3 library:

export PATH=/opt/anaconda3/bin:$PATH


Created a small test script to confirm if the path is correct:

$ more test1.php
<?php
$output = shell_exec('echo $PATH');
echo "<pre>$output</pre>";
?>



This gives the following output:

/opt/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


Hence, we can ensure that our apache2 user is able to access anaconda library of python.

Reference: