[SOLVED] Cannot connect to the Docker daemon

This is docker-compose.yml
version: ‘3’

services:
drone-server:
container_name: drone-server
image: drone/drone:latest
ports:
- “36000:80”
- 8443:443
- 9000
volumes:
- ./var/run/docker.sock:/var/run/docker.sock
- ./var/lib/drone:/data

environment:
  - DRONE_LOGS_DEBUG=true
  - DRONE_GIT_ALWAYS_AUTH=false
  - DRONE_SERVER_HOST=172.20.30.203
  - DRONE_GOGS_SERVER=http://172.20.30.203:10080
  - DRONE_SERVER_PROTO=http
  - DRONE_TLS_AUTOCERT=false
restart: always
networks:
  - drone_net

gogs:
container_name: gogs
image: gogs/gogs
ports:
- “10022:22”
- “10080:3000”
volumes:
- ./var/gogs:/data
restart: always
depends_on:
- gogs-mysql
links:
- gogs-mysql:db
networks:
- drone_net

gogs-mysql:
container_name: gogs-mysql
image: mysql:latest
ports:
- 3306:3306
volumes:
- ./opt/mysql/mysqlVolume:/var/lib/mysql
- ./var/run/docker.sock:/var/run/docker.sock
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: gogs
MYSQL_USER: gogs
MYSQL_PASSWORD: pass
TZ: Asia/Shanghai

restart: always
networks:
   - drone_net

networks:
drone_net:
driver: bridge

I have delete the agent.but It seem no function.

I know the reason
error “./var/run/docker.sock:/var/run/docker.sock”
when I change to /var/run/docker.sock:/var/run/docker.sock
it is OK.

image
I meet a error.

I lose the Dockerfile …
It’s run now.