version: '3.8'

services:
  portainer:
    image: portainer/portainer-ce:latest
    container_name: portainer
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - portainer_data:/data
    ports:
      - "9000:9000"    # HTTP interface (optional)
      - "9443:9443"    # HTTPS interface (recommended)
    environment:
      - PORTAINER_ADMIN_PASSWORD_FILE=/tmp/portainer_password
    # Uncomment below if you want to set admin password via environment
    # environment:
    #   - PORTAINER_ADMIN_PASSWORD=your_secure_password_here

volumes:
  portainer_data:
  
 
 