Monthly Archives: February 2021

Export Import GIS Shape File to Postgres or Postgis

For importing or ingesting GIS shapefile to a postgresql database we can use shp2pgsql  command, example:   shp2pgsql -s 4326 -c -D -I myshapefile dbtable | \ psql -d dbname -h localhost -p 5432 -U dbuser   In example above we convert or import the shapefile  (myshapefile) to dbtable in dbname database with a dbuser. […]

List of Useful Docker Commands – Docker run

List of all docker containers which we created including stopped containers: docker ps –all   List all the containers which are running: docker ps   Create container (example: pull hello-world image from docker hub and create a new container from the image). It returns a container id. docker create hello-world   Docker run command,  which […]

How to copy a file into or from a running docker container

In this post, we show how to copy a file to a running docker container.  Also we show how to copy an existing file inside a running docker container to your local folder.   For copying a file inside a running docker container the command is:   docker cp yourfile container-id://path-inside-docker   For example to […]

How to make docker image and push to docker hub

In this tutorial we explain how to make a docker image and then push to docker hub so that others can pull the image and make docker containers based on the image.   For making a docker image we need to have a Dockerfile file. As an example, you have a simple nodejs application and […]

how to backup or dump and restore postgresql database

In this tutorial, we show how to backup or dump and how to restore a postgresql database.   For making a backup you can use pg_dump command like below:   pg_dump -Fc -h localhost mydatabase -U myuser -n myschema > test.pgdump   in the above, change hostname (localhost), database name (mydatabase), user (myuser) and schema […]

How to stop, kill or remove all containers

In this tutorial, we show how to stop all container. Also, we show how to remove or kill all docker containers.   Please note that sometimes docker containers has executed and exited and are not in the running mode, on the other hand, it is possible we have a docker container which is running and […]

How to stop, start, run, remove docker containers

In this tutorial, we show how to stop, start or run a docker container. Also we show how to remove an existing container. We also talk about what is the difference between docker run and docker start.   If you don’t know what is docker container, we recommend you have a look at the essential […]