Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1154 from weaveworks/issue/1113-easier-sshconf-mount
Browse files Browse the repository at this point in the history
Put baked-in SSH config in /etc/ssh
  • Loading branch information
squaremo authored Jun 21, 2018
2 parents 33408f2 + 4f94994 commit 6356419
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions docker/Dockerfile.flux
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0'
COPY --from=quay.io/squaremo/kubeyaml:0.3.1 /usr/lib/kubeyaml /usr/lib/kubeyaml/
ENV PATH=/bin:/usr/bin:/usr/local/bin:/usr/lib/kubeyaml

# Add git hosts to known hosts file so when git ssh's using the deploy
# key we don't get an unknown host warning.
RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && \
ssh-keyscan github.com gitlab.com bitbucket.org >> ~/.ssh/known_hosts && \
chmod 600 ~/.ssh/known_hosts
# Add git hosts to known hosts file so we can use
# StrickHostKeyChecking with git+ssh
RUN ssh-keyscan github.com gitlab.com bitbucket.org >> /etc/ssh/ssh_known_hosts
# Add default SSH config, which points at the private key we'll mount
COPY ./ssh_config /root/.ssh/config
RUN chmod 600 /root/.ssh/config
COPY ./ssh_config /etc/ssh/ssh_config

COPY ./kubectl /usr/local/bin/
COPY ./fluxd /usr/local/bin/
Expand Down

0 comments on commit 6356419

Please sign in to comment.