Before following below steps, you can run as root user
sudo -s
- INSTALL DOCKER ON LINUX
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi
# Add the repository to your APT sources
sudo sh -c 'echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list'
# Then import the repository key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# Install docker
sudo apt-get update
sudo apt-get install -y docker.io cgroup-lite apparmor
- INSTALL ALPINE - A SMALL OS AND POSTGRES -ALPINE VERSION
docker pull alpine
docker run -i -t alpine /bin/sh
docker pull postgres:9.6.2-alpine
- INSTALL PGADMIN 4 ON DOCKER
docker pull fenglc/pgadmin4
# link pgadmin 4 to your docker container of PostgresQL,
# where test-pgadmin4 is the name for the container of pgadmin 4 and db-test is the name of the PostgresQL container
docker run --name test-pgadmin4 \
--link db-test:postgres \
-p 5050:5050 \
-d fenglc/pgadmin4