Running postgresql on docker
- Request access to LinuxONE Community Cloud. Follow instructions here
1.1 install docker
# sudo yum install docker
1.2 Ensure docker installed by checking version
# sudo docker version
2.1 Pull postgres docker image
# sudo docker pull postgres:latest
2.2 List docker images
# sudo docker images
3.1 Run postgres docker image as a container
# docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
3.2 After succesfully running last command, you can now check the running container
# docker ps
3.3 Now you can execture Postgres container
# docker exec -it some-postgres bash
3.4 connect to postgresql using user postgres
# psql -U postgres