Comments (3)
docker-compose v3 doesn't support the volumes-from key any more, so the instructions from that point of view are getting obsolete.
I followed the instructions using the top-level "volumes" key, Here's a full working example:
Of course, the adding-of-the-keys manually as outlined in the README is still required.
I used kroniak/ssh-client for the test images just because it was an easy image that had the ssh client installed for testing.
version: '3'
volumes:
dot_ssh:
socket_dir:
services:
ssh-agent:
container_name: ssh-agent
image: nardeas/ssh-agent:latest
volumes:
- "dot_ssh:/root/.ssh"
- "socket_dir:/.ssh-agent"
environment:
- SSH_AUTH_SOCK=/.ssh-agent/socket
ssh1:
container_name: ssh1
image: kroniak/ssh-client:latest
command: 'sh -c "tail -f /dev/null"'
volumes:
- "dot_ssh:/root/.ssh"
- "socket_dir:/.ssh-agent"
environment:
- SSH_AUTH_SOCK=/.ssh-agent/socket
ssh2:
container_name: ssh2
image: kroniak/ssh-client:latest
command: 'sh -c "tail -f /dev/null"'
volumes:
- "dot_ssh:/root/.ssh"
- "socket_dir:/.ssh-agent"
environment:
- SSH_AUTH_SOCK=/.ssh-agent/socket
from ssh-agent.
I have written a PR for passwordless using docker secrets. This is my compose v3 file..
version: "3.1"
services:
ssh-agent-load:
image: ssh-agent
environment:
DEBUG: 1
depends_on:
- ssh-agent
volumes:
- ~/.ssh:/.ssh
- sshagent:/.ssh-agent
command: ssh-add-pass git_key /run/secrets/ssh_key
secrets:
- ssh_key
php:
image: php
volumes:
- sshagent:/.ssh-agent
depends_on:
- ssh-agent-load
entrypoint: autoaggregate
ssh-agent:
image: ssh-agent
volumes:
- sshagent:/.ssh-agent
ssh-agent-list:
image: ssh-agent
environment:
DEBUG: 1
depends_on:
- ssh-agent
volumes:
- sshagent:/.ssh-agent
command: ssh-add-list
secrets:
ssh_key:
file: ssh_keytxt
volumes:
sshagent:
from ssh-agent.
Thank you! I will look more into this. I haven't had any extra time past few months to focus on this, but since a lot of people find it useful I will focus more on it.
This could be added as compose example for sure!
from ssh-agent.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssh-agent.