Add an autostart, for autoloading from the "ssh_private_key" env var.

This commit is contained in:
John Internet 2020-01-02 21:02:22 +00:00
parent c9f5dd48ad
commit 17bbc35df4
2 changed files with 5 additions and 1 deletions

View file

@ -9,7 +9,7 @@ RUN rm -rf /var/cache/apk/*
RUN mkdir ~/.ssh
# Copy in our executables.
COPY agent-start agent-stop agent-add /bin/
COPY agent-start agent-stop agent-add agent-autostart /bin/
COPY hosts-clear hosts-add /bin/
RUN chmod +x /bin/agent-* /bin/hosts-*

4
agent-autostart Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
source agent-start
echo "$SSH_PRIVATE_KEY" | agent-add