I am trying to create a docker-compose which sets up a huge environment of dockers with portainer as a manager.
The problem is that the first time the user use "docker-compose up" and the portainer start running, he has to navigate to portainer web interface (localhost:9000) and set-up the admin user and password.
How can I automate this step and create a portainer with a default user that I define so when the user navigate to portainer on the first time, the admin user is already created.
Here is my docker-compose.yml
version: '3.3'
services:
portainer:
image: portainer/portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./portainer/portainer_data:/data
ports:
- "9000:9000"