Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Failed to detect shell correctly in container image build case #114

@mortyccp

Description

@mortyccp

The shell detection will check the process of the host instead of stopping inside the container image build environment
The following is the ps output inside the container build step
It will detect the shell as bash but the image being used don't have bash

PID   USER     TIME  COMMAND
    1 root      0:00 /usr/bin/bash
   24 root      0:00 sh -c (/scripts-926-2646660/detect_shell_script /scripts-926-2646660/step_script 2>&1 | tee -a /logs-926-2646660/output.log) &
   25 root      0:00 /usr/bin/bash /scripts-926-2646660/step_script
   26 root      0:00 tee -a /logs-926-2646660/output.log
   30 root      0:00 /usr/bin/bash /scripts-926-2646660/step_script
   72 root      0:00 buildah build
   80 root      0:27 {3} buildah-in-a-user-namespace build
  367 root      0:00 {5} buildah-chroot-runtime
  375 root      0:00 {5} buildah-chroot-exec /bin/sh -c ps
  383 root      0:00 ps

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions