How do I create a docker image for postgres with nix?

This page summarizes the projects mentioned and recommended in the original post on /r/NixOS

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • postgres

    Docker Official Image packaging for Postgres (by docker-library)

  • I got started on trying to make a basic postgres image but I can't seem to figure out how to include a shell script in the same folder as my nix file (fetched from https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh and to be modified once I get it working) into the docker image as an entrypoint

  • nixpkgs

    Nix Packages collection & NixOS

  • You can try to find solution here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/docker/examples.nix

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • nix2container

    An archive-less dockerTools.buildImage implementation

  • dockerTools is the canonical way, but https://github.com/nlewo/nix2container seems to be gaining support as it's faster and doesn't use so much disk space while building.

  • devenv

    Fast, Declarative, Reproducible, and Composable Developer Environments

  • depending on what you want to do, https://devenv.sh may also be a good option? esp. if part of the reason is to be able to run Postgres as a temp. docker while coding+testing locally.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts