geerlingguy / pi-router

Raspberry Pi-based OpenWRT router config for 4G/5G Waveshare Dual Ethernet board.
103 stars 9 forks source link

Docker volume for ssh key #5

Closed rjocoleman closed 9 months ago

rjocoleman commented 2 years ago

@geerlingguy is the docker volume required for ~/.ssh/id_ed25519.

I don't have ssh keys there as they're all coming in via an ssh-agent, so the docker compose will fail to bring it up.

looks like the suggested docker attach openwrt-build obviates the need for this and it could be removed?

Else, what about a default password (shudder), not ideal but it's it's only used for the builder on a local machine not so high hazard? e.g.

diff --git a/Dockerfile b/Dockerfile
index 4717b64..ba9d11d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,6 +13,7 @@ RUN chmod 644 /root/.ssh

 # Add build user.
 RUN useradd -ms /bin/bash build
+RUN echo 'build:build' | chpasswd

 # Create build directory.
 RUN mkdir /build && chown build:build /build
diff --git a/docker-compose.yml b/docker-compose.yml
index 456cc75..41d2465 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,8 +13,6 @@ services:
     volumes:
       - linux:/build
       - ./images:/images
-      # Mount local user's SSH key into container.
-      - ~/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro

 volumes:
   linux:
stale[bot] commented 1 year ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 1 year ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

github-actions[bot] commented 11 months ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

github-actions[bot] commented 9 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.