Install custom packages on my deploy, do I need Docker?

Hey folks,

Say I want to install mongotools in order to access the mongoexport command within my code.

Am I expected to create a Docker image for deployment on Render? Or is it possible to run the “apt-get” command during the build?

I am running a Next.js app (Node.js) so it’s not a huge deal to create a Dockerfile, but I’d rather use simpler options if that’s possible.

Hey Eric,

You might not have to go that far - it’s a big step. Please upvote this feature https://feedback.render.com/features/p/allow-custom-packages-to-be-installed

If you can find a binary of mongoexport you can include it in your deployment in the build process - in this example https://gist.github.com/johnbeynon/a138d7b38bc45af62495a41c74809f07 I’m grabbing an archive and including it in the build so that it’s available in the final deployment,

Regards,

John B

Makes sense! I must admit creating the Docker image is a tough one here as I am using a monorepo with PNPM workspaces and shared code
For which system should I build the binary? Because I guess it depends on the OS used by Render.com (probably some Ubuntu or Alpine image)

Yes, best to get the right one

$ cat /etc/os-releasePRETTY_NAME="Debian GNU/Linux 10 (buster)"NAME="Debian GNU/Linux"VERSION_ID="10"VERSION="10 (buster)"VERSION_CODENAME=busterID=debianHOME_URL="https://www.debian.org/"SUPPORT_URL="https://www.debian.org/support"BUG_REPORT_URL="https://bugs.debian.org/"

John B