Below you will find pages that utilize the taxonomy term “Docker”
Easy run your html with docker and Nginx
If you’ve ever needed to quickly run a built or a static html (js and css) site.
In my case it helps to preview and test locally Go Hugo built sites, react built content or preview any site I’m given.
A tool like Browser sync would work perfectly, and gives lots of tools. But a more “real” scenario would be using a true server like Nginx.
First you need to have Docker installed and the the Nginx image.
Setting PostgreSQL using docker
You, of course, need to have docker installed.
Download the Postgres image.
$ docker pull postgres
This will pull the latest version of the database available. If you want a different version you can specify it changing the word postgres for postgres:9.6 in this case to get the version 9.6.
Start the container
docker run --name pg-local -e POSTGRES_PASSWORD=pgpassword -d -p 5432:5432 -v $HOME/Documents/docker/db_vol/postgres:/var/lib/postgresql/data postgres:9.6
pg-local is the name of the container.
pgpassword is going to be the postgres user password inside the container.