Sign inSign up

igortimoshenko/docker-postgresql-client

By igortimoshenko

Updated over 10 years ago

This repository contains Dockerfile of postgresql-client for Docker's automated build

Image
0

10K+

igortimoshenko/docker-postgresql-client repository overview

postgresql-client Dockerfile

This repository contains Dockerfile of postgresql-client for Docker's automated build published to the public Docker Hub Registry.

Base Docker Image
Installation
  1. Install Docker.

  2. Download automated build from public Docker Hub Registry: docker pull igortimoshenko/docker-postgresql-client

    (alternatively, you can build an image from Dockerfile: docker build -t="igortimoshenko/docker-postgresql-client" github.com/igortimoshenko/docker-postgresql-client)

Usage

Start container specifying the executable script for cron:

docker run -d \
-v `<script-dir>`/script.sh:/root/script.sh \
--volumes-from=postgresql \
-e CRON_JOB='* * * * * ~/script.sh >> /var/log/script.log 2>&1' \
-e HOST="postgresql" \
-e PORT="5432" \
-e USER="postgresql" \
-e PASS="postgresql" \
--link postgresql:postgresql \
igortimoshenko/docker-postgresql-client    

Note that if you need environment variables within your cron script then include the following line source /root/.env-vars in your script

Tag summary

Content type

Image

Digest

Size

66 MB

Last updated

over 10 years ago

docker pull igortimoshenko/docker-postgresql-client