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

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. 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

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. 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

  4. 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.

  5. devenv

    Fast, Declarative, Reproducible, and Composable Developer Environments using Nix

    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

Did you know that Nix is
the 28th most popular programming language
based on number of references?