Update README.md

This commit is contained in:
Ruan Bekker 2019-04-22 17:00:22 +02:00 committed by GitHub
parent 470833a241
commit fe4a494ac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -379,6 +379,31 @@ steps:
event: [push] event: [push]
``` ```
### Mount Docker Socket Example
This will allow your container to run docker commands as you are logged onto the host.
Ensure you set your user as admin:
`--env=DRONE_USER_CREATE=username:youruser,admin:true`
Mentioned here:
- https://discourse.drone.io/t/linter-untrusted-repositories-cannot-mount-host-volumes/3438
And that your repository is marked as trusted.
```
deploy:
image: docker
secrets: [ swarm_key, swarm_host ]
commands:
- docker node ls
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: [push]
branch: [master, develop, release/*]
```
### Example Pipelines ### Example Pipelines