logoalt Hacker News

mlnjyesterday at 5:11 PM3 repliesview on HN

>You have to make sure you're not putting any secrets in the container environment.

How does this work exactly? containers still need env vars and access to databases and cloud environments. Without these the container is just useless isolated pod.


Replies

lbhdcyesterday at 5:37 PM

Not who you asked, but I have a similar setup. I can run everything I need for local development in that image (db, message queue emulator, cache, other services). So, setting things like environment variables or running postgres work the same as they do outside the container.

The image itself isn't the same image that the app gets deployed in, but is a portable dev environment with everything needed to build and run my apps baked in.

This comes with some nice side effects like being able to instantly spin up clean work environments on my laptop, someone elses, or a remote vm.

Lutgeryesterday at 8:03 PM

This really depends on your setup. If possible, I have local development containers as much as possible. nginx, postgres, redis, etc. I have several containers, each only has access to what it needs. We have an isolated cloud environment for development, in its own aws account.

Its not going to stop attacks, but it will limit blast radius a lot.

jack_ppyesterday at 5:22 PM

Maybe don't use JavaScript on the backend.