Giter VIP home page Giter VIP logo

docker-alpine-postgres's Introduction

PostgreSQL docker image based on Alpine Linux

This repository builds a docker image that accepts the same env vars as the official postgres build but with a much smaller footprint. It achieves that by basing itself off the tiny official alpine linux image.

Why?

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
alpine-postgres     latest              b98ff96bb65a        About an hour ago   30.82 MB
alpine              latest              70c557e50ed6        5 weeks ago         4.798 MB
percona             latest              70588d0c4cd4        4 weeks ago         308.6 MB
postgres            latest              6d6a71f8528e        4 weeks ago         265.1 MB

Build

$ make build

DockerHub

This image is published on DockerHub as docker pull kiasaki/alpine-postgres.

Click here to see it's DockerHub homepage

Usage

This image works in the same way the official postgres docker image work.

It's documented on DockerHub in it's README: https://hub.docker.com/_/postgres/.

For example, you can start a basic PostgreSQL server, protected by a password, listening on port 5432 by running the following:

$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d kiasaki/alpine-postgres

Next, you can start you app's container while linking it to the PostgreSQL container you just created giving it access to it.

$ docker run --name some-app --link some-postgres:postgres -d application-that-uses-postgres

Your app will now be able to access POSTGRES_PORT_5432_TCP_ADDR and POSTGRES_PORT_5432_TCP_PORT environment variables.

License

MIT. See LICENSE file.

docker-alpine-postgres's People

Contributors

evilr00t avatar jwanglof avatar lospejos avatar nuaimat avatar swatto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.