diff --git a/Dockerfile b/Dockerfile index 6fb17c6..12ac8f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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-* diff --git a/agent-autostart b/agent-autostart new file mode 100644 index 0000000..3b983bf --- /dev/null +++ b/agent-autostart @@ -0,0 +1,4 @@ +#!/bin/sh + +source agent-start +echo "$SSH_PRIVATE_KEY" | agent-add \ No newline at end of file