---
title:
source:
author: shenwei
published:
created:
description:
tags: [docker, portainer]
---


#docker #portainer 

## portainer

create docker-compose.yml
```
services:
  portainer:
    container_name: portainer
    image: portainer/portainer-ce:lts
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data
    ports:
      - 9443:9443
      - 8000:8000  # Remove if you do not intend to use Edge Agents

volumes:
  portainer_data:
    name: portainer_data

networks:
  default:
    name: portainer_network
```

```
docker-compose run -d
```



[[🟠如何删除旧的废弃的docker container +volume]]