😱

Snyk Container testの失敗談①

に公開

概要

本当はこの程度の失敗を残す必要はないのだが、検索しても見つからなかったため残す。

問題内容

snyk container test コマンドで自前のコンテナイメージをテストしたところ以下のエラーが発生。

$ snyk container test node-test:1.0.0

 ERROR   Unspecified Error (SNYK-CLI-0000)

           Unsupported archive type. Please use a Docker archive, OCI image layout, or
           Kaniko-compatible tarball.

Docs:    https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-cli-0000

状況

macのローカル環境で実行。

切り分け

ベースとなるnodeイメージをPullして同一コマンドを実行したところ問題は発生せずにtest結果が表示された。

結論

--platform=linux/arm64オプションを使用する必要があった。
https://docs.snyk.io/developer-tools/snyk-cli/commands/container-test

Discussion