🚁
CI/CD & GitOps

Drone CI

Container-native CI/CD — pipelines run in Docker

🐧 Linux🍎 Mac🪟 Windows
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

Drone CI runs each pipeline step inside a Docker container on your own server.

📁

Config files for Drone CI

Where to create or edit the main configuration — paths below match the setup steps.

  • .drone.yml

    Location: Repository root

    Pipeline kind, steps, and Docker images for Drone

📥

Step 01

Install Drone CI

(01)Install Drone CI

Linux
1docker run -d --name drone -p 80:80 -p 443:443 \
2 -v /var/run/docker.sock:/var/run/docker.sock \
3 -e DRONE_GITHUB_CLIENT_ID=your_id \
4 -e DRONE_GITHUB_CLIENT_SECRET=your_secret \
5 -e DRONE_RPC_SECRET=your_rpc_secret \
6 -e DRONE_SERVER_HOST=drone.example.com \
7 -e DRONE_SERVER_PROTO=https \
8 drone/drone:2
⚙️

Step 02

Configure Drone CI

(01)Add .drone.yml to repo root

Drone reads .drone.yml from the repository root on each push.

Linux
1cat > .drone.yml << 'EOF'
2kind: pipeline
3type: docker
4name: default
5steps:
6 - name: test
7 image: node:20
8 commands:
9 - npm ci
10 - npm test
11EOF
12git add .drone.yml && git commit -m "Add Drone CI" && git push

Step 03

Verify

(01)Verify installation

Linux
1docker ps | grep drone