Initial commit of role files and readme.
This commit is contained in:
29
README.md
29
README.md
@@ -1,2 +1,31 @@
|
||||
# ansible-role-docker
|
||||
|
||||
This role installs docker-ce (Docker Community Edition) on a Debian system. (Tested on Stretch and Buster) It also exposes the Docker socket over TCP on port 2376, using X509 TLS certificates to enable / disable access.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Ensure that the fqdn (hostname -f) of the host is resolvable through dns.
|
||||
|
||||
## Example playbook
|
||||
|
||||
```
|
||||
---
|
||||
- hosts:
|
||||
- hostname
|
||||
roles:
|
||||
- role: docker
|
||||
```
|
||||
|
||||
## Copy TLS certificates
|
||||
|
||||
Copy /root/.docker/<fqdn> to your local home directory.
|
||||
|
||||
## Remotely connect to your docker host
|
||||
|
||||
```
|
||||
echo 'export DOCKER_HOST=tcp://<hostname>:2376
|
||||
export DOCKER_CERT_PATH=~/.docker/<hostname>
|
||||
export DOCKER_TLS_VERIFY=1' > vars
|
||||
source vars
|
||||
docker info
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user