Skip to content

Instantly share code, notes, and snippets.

@alex-salnikov
Created November 2, 2022 17:13
Show Gist options
  • Save alex-salnikov/ddcf12fa2cd2b97e6f94c31eba6f2cd6 to your computer and use it in GitHub Desktop.
Save alex-salnikov/ddcf12fa2cd2b97e6f94c31eba6f2cd6 to your computer and use it in GitHub Desktop.
portainer / docker-compose
version: '3'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer-main
# command: --no-analytics
command: -H unix:///var/run/docker.sock
restart: unless-stopped
security_opt:
- no-new-privileges:true
ports:
- 9000:9000
- 8000:8000
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- portainer_data:/data
# dns:
# - 192.168.1.30
# - 192.168.1.1
portainer_agent:
image: portainer/agent:latest
container_name: portainer-agent
ports:
- 9001:9001
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/lib/docker/volumes:/var/lib/docker/volumes
restart: always
# dns:
# - 192.168.1.30
# - 192.168.1.1
volumes:
portainer_data:
# - update
# docker-compose pull
# docker-compose up -d
# docker-compose down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment