Building a production dockerfile

Hi there!
I have just configured flox to develop a couple of projects I’m running on (python and node).

Normally I use docker containers to deploy software, so I was thinking what will be the best way to have a docker image as similar as possible as the dev environment.

I have seen “containerize”, the problem is that I don’t want to install some deps, for example, postgresql.

Thanks!

Perhaps separating the environment into two and layering them? the dependencies you want in the image into their own environment and layering on the dependencies you don’t want in their own environment? We definitely want to offer a service management feature in Flox environments soon to help manage services like PostgreSQL databases…this is a workaround until then. Would be interested if that setup works for you…the annoyance being having to activate the layers in order.

I want to keep it simple. I like flox because it is simple. Having to add layers will complicate the on board of more devs.

Maybe the typical production vs dev dependencies?

Or maybe some instructions of how to build the image with nix using the same packages.
I’m a completly newbie with Nix and I’am having a hard time trying to build a docker image using the same packages.

agree - there are two features Flox doesn’t have yet have that would make that simpler:

  1. a service management framework in the environment
  2. the build for the environment