slimtoolkit / slimtoolkit/slim

Can't run image.

Open
#694 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.4k
Forks
840
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

➜ ~ slim build --target ghcr.io/cyclonedx/cdxgen:latest --tag ghcr.io/cyclonedx/cdxgen:slims --http-probe=true
cmd=build info=param.http.probe message='using default probe'
cmd=build state=started
cmd=build info=params tags='ghcr.io/cyclonedx/cdxgen:slims' image-build-engine='internal' target.type='image' target.image='ghcr.io/cyclonedx/cdxgen:latest' continue.mode='probe' rt.as.user='true' keep.perms='true'
cmd=build state=image.inspection.start
cmd=build info=image id='sha256:0341e32d89418b307daebea66eae33cccb53c2a27b9ecf7cbde9594d11556707' size.bytes='8155766825' size.human='8.2 GB'
cmd=build info=image.stack index='0' name='ghcr.io/cyclonedx/cdxgen:latest' id='sha256:0341e32d89418b307daebea66eae33cccb53c2a27b9ecf7cbde9594d11556707'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
cmd=build info=container name='slimk_40961_20240621142124' id='b54f73d53717f8f6a0bacc1b8e76d320f527da2cc9413ff3c47f71f1cdba5bcb' status='created'
cmd=build info=container status='running' name='slimk_40961_20240621142124' id='b54f73d53717f8f6a0bacc1b8e76d320f527da2cc9413ff3c47f71f1cdba5bcb'
cmd=build info=container message='obtained IP address' ip='172.17.0.3'
cmd=build info=cmd.startmonitor status='sent'
cmd=build info=event.startmonitor.done status='received'
cmd=build info=container name='slimk_40961_20240621142124' id='b54f73d53717f8f6a0bacc1b8e76d320f527da2cc9413ff3c47f71f1cdba5bcb' target.port.list='' target.port.info='' message='YOU CAN USE THESE PORTS TO INTERACT WITH THE CONTAINER'
cmd=build state=http.probe.error error="NO EXPOSED PORTS" message="expose your service port with --expose or disable HTTP probing with --http-probe=false if your containerized application doesnt expose any network services"
cmd=build state=exited code=33554435
cmd=build info=container.inspector.cleanup name='slimk_40961_20240621142124' id='b54f73d53717f8f6a0bacc1b8e76d320f527da2cc9413ff3c47f71f1cdba5bcb'
cmd=build state=container.target.shutdown.start
cmd=build state=container.target.shutdown.done
cmd=build info=report file='slim.report.json'
cmd=build info=exit code='33554435' version='darwin/arm64|Transformer|1.40.11|latest|latest' location='/opt/homebrew/bin'
app='slim' message='GitHub Discussions' info='https://github.com/slimtoolkit/slim/discussions'
app='slim' message='Join the CNCF Slack channel to ask questions or to share your feedback' info='https://cloud-native.slack.com/archives/C059QP1RH1S'
app='slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
app='slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'


Actual Behavior

➜ ~ docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen:slims -r /app --server --server-host 0.0.0.0
node:internal/modules/cjs/loader:1186
const err = new Error(message);
^

Error: Cannot find module 'node-gyp/bin/node-gyp.js'
Require stack:

  • /opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/make-spawn-args.js
  • /opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/run-script-pkg.js
  • /opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/run-script.js
  • /opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/dir.js
  • /opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/git.js
  • /opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/fetcher.js
  • /opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/index.js
  • /opt/cdxgen/node_modules/.pnpm/@npmcli+metavuln-calculator@7.1.1/node_modules/@npmcli/metavuln-calculator/lib/index.js
  • /opt/cdxgen/node_modules/.pnpm/@npmcli+arborist@7.5.2/node_modules/@npmcli/arborist/lib/audit-report.js
  • /opt/cdxgen/node_modules/.pnpm/@npmcli+arborist@7.5.2/node_modules/@npmcli/arborist/lib/arborist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15)
    at Function.resolve (node:internal/modules/helpers:133:19)
    at Object. (/opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/make-spawn-args.js:4:37)
    at Module._compile (node:internal/modules/cjs/loader:1434:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
    at Module.load (node:internal/modules/cjs/loader:1249:32)
    at Module._load (node:internal/modules/cjs/loader:1065:12)
    at Module.require (node:internal/modules/cjs/loader:1271:19)
    at require (node:internal/modules/helpers:123:16)
    at Object. (/opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/run-script-pkg.js:1:23) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/make-spawn-args.js',
    '/opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/run-script-pkg.js',
    '/opt/cdxgen/node_modules/.pnpm/@npmcli+run-script@8.1.0/node_modules/@npmcli/run-script/lib/run-script.js',
    '/opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/dir.js',
    '/opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/git.js',
    '/opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/fetcher.js',
    '/opt/cdxgen/node_modules/.pnpm/pacote@18.0.6/node_modules/pacote/lib/index.js',
    '/opt/cdxgen/node_modules/.pnpm/@npmcli+metavuln-calculator@7.1.1/node_modules/@npmcli/metavuln-calculator/lib/index.js',
    '/opt/cdxgen/node_modules/.pnpm/@npmcli+arborist@7.5.2/node_modules/@npmcli/arborist/lib/audit-report.js',
    '/opt/cdxgen/node_modules/.pnpm/@npmcli+arborist@7.5.2/node_modules/@npmcli/arborist/lib/arborist/index.js'
    ]
    }

Node.js v22.2.0


Steps to Reproduce the Problem


Specifications

  • Version:
  • Platform:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the slim build command with --http-probe=true, then inspect the container image and the /opt/cdxgen/node_modules/.../make-spawn-args.js path shown in the Node.js stack trace. Verify whether the resulting image can run the provided docker run command without MODULE_NOT_FOUND, and separately account for the reported no-exposed-ports probe error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, node.js
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.