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

helm-op: Add git hosts to known hosts in /etc/ssh/ssh_known_hosts #1188

Merged
merged 1 commit into from
Jul 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions docker/Dockerfile.helm-operator
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ ENTRYPOINT [ "/sbin/tini", "--", "helm-operator" ]

RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0'

# 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 ./helm-operator /usr/local/bin/
Expand Down