Skip to content

Instantly share code, notes, and snippets.

@shantanoo-desai
Created March 8, 2022 16:24
Show Gist options
  • Save shantanoo-desai/3c6f328e109fb9464a8a83114b4a4615 to your computer and use it in GitHub Desktop.
Save shantanoo-desai/3c6f328e109fb9464a8a83114b4a4615 to your computer and use it in GitHub Desktop.
Using Docker Secret as a file without using Docker Swarm for Portainer
version: '3.7'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: sys_portainer
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
- '--admin-password-file=/run/secrets/portainer_admin_password'
- '--no-analytics'
networks:
- some_network
ports:
- "9000:9000"
secrets:
- portainer_admin_password
networks:
some_network:
external: true
secrets:
portainer_admin_password:
file: ./portainer_admin_password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment