13 lines
640 B
Markdown
13 lines
640 B
Markdown
### Create a subnet for our test and build the image (debian stable-slim with openssh server and python3 -> ansible dependencies)
|
|
`docker network create --subnet=172.172.0.0/16 silicone`
|
|
`docker build -t silicone:base .`
|
|
|
|
### Create a container with static ip for each service to test (e.g. __etherpad__ here)
|
|
`docker run --name etherpad -d --net silicone --ip 172.172.0.2 -it silicone:base`
|
|
|
|
### Copy your ssh key
|
|
`docker cp ~/.ssh/id_rsa.pub etherpad:/root/.ssh/authorized_keys`
|
|
`docker exec -it etherpad chown root.root /root/.ssh/authorized_keys`
|
|
|
|
|
|
### Then you can go with ansible using 172.172.0.2 as your host inside inventory.
|