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

Verify scanned keys in same build step as scan #1908

Merged
merged 1 commit into from
Apr 8, 2019

Conversation

squaremo
Copy link
Member

@squaremo squaremo commented Apr 8, 2019

ssh-keyscan can get keys which then fail verification (e.g., if it misses out a host for some reason), but nonetheless Docker will cache the intermediate image, which will cause subsequent builds to fail. This is a pain to recover from.

This commit changes the Dockerfiles such the verification is done in the same step as the keyscan -- so if it fails, the intermediate image won't be cached, and subsequent builds will do the keyscan again.

ssh-keyscan can get keys which then fail verification (e.g., if it
misses out a host for some reason), but nonetheless cache the
intermediate image, which will cause subsequent builds to fail. This
is a pain to recover from.

This commit changes the Dockerfiles such the verification is done in
the same step as the keyscan -- so if it fails, the intermediate image
won't be cached, and subsequent builds will do the keyscan again.
@2opremio
Copy link
Contributor

2opremio commented Apr 8, 2019

ssh-keyscan can get keys which then fail verification

I wonder why ssh-keyscan doesn't exit with non-zero when that happens. It seems to be by design

@squaremo squaremo merged commit c32e28b into master Apr 8, 2019
@squaremo squaremo deleted the build/fail-on-bad-keyscan branch April 8, 2019 16:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants