I've just started using Docker and tried to create my first container using Portainer. After filling in all the required fields and hitting create, I got an error saying "exited - code 1" when the container tried to start. I checked the logs and it shows the following errors: "Error: Postgres details not defined" and "JWT Secret cannot be undefined". Is there something obvious that I might have missed? I usually work with LXC containers, so I'm looking to understand what's going wrong with Docker. Any guidance would be appreciated!
4 Answers
It sounds like you might have missed some of the required configuration values for your application. Without those, the container can't start properly. Double-check the documentation for the app you're trying to run to make sure you've filled everything in correctly.
I noticed the errors in your logs too. It looks like your application needs a Postgres database setup. Did you set one up and provide the connection details? That could be why it's failing to start.
Your issue isn’t really about Docker itself. It seems like you didn’t provide necessary configuration values in your setup. Go back to the documentation and ensure you provide the proper Postgres details and a JWT secret.
Thanks for the tip! I’ll review the docs again to find what I missed.
Before diving deeper with Portainer, it might be useful to get comfortable with the Docker command line interface. Docker operates a bit differently than LXC containers; it's more geared towards ephemeral storage. Make sure any data you need persists in a mapped volume, or you might lose it if the container is recreated. I recommend checking out some beginner videos from Techworld with Nana.
You're right! I skipped a few setup steps. Appreciate the quick response!