Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker image builds > 1.2.0 do not work at all, they fail to execute optic-ci. Example: ``` $ docker run --rm snyk/sweater-comb:1.2.2 --help internal/modules/cjs/loader.js:905 throw err; ^ Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault' Require stack: - /sweater-comb/node_modules/@useoptic/api-checks/build/ci-cli/commands/compare/compare.js - /sweater-comb/node_modules/@useoptic/api-checks/build/ci-cli/commands/compare/index.js - /sweater-comb/node_modules/@useoptic/api-checks/build/ci-cli/make-cli.js - /sweater-comb/index.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:101:18) at Object.<anonymous> (/sweater-comb/node_modules/@useoptic/api-checks/build/ci-cli/commands/compare/compare.js:3:30) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/sweater-comb/node_modules/@useoptic/api-checks/build/ci-cli/commands/compare/compare.js', '/sweater-comb/node_modules/@useoptic/api-checks/build/ci-cli/commands/compare/index.js', '/sweater-comb/node_modules/@useoptic/api-checks/build/ci-cli/make-cli.js', '/sweater-comb/index.js' ] } ``` Adding babel.config.js and the babel runtime as a package dependency seems to fix this issue. Also added schemas to the image build -- similar issue was fixed in the package.json [here](https://github.com/snyk/sweater-comb/pull/176/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R12), but also needed in the image build as well, since we're stripping it down. Updated runtime image base to alpine. It's a little bigger, but distroless was too hard to debug without a shell and its still under 200MB.
- Loading branch information