Giter Site home page Giter Site logo

Comments (6)

rhatdan avatar rhatdan commented on August 17, 2024

chcon -t container_runtime_exec_t /usr/bin/container-entrypoint
I think will fix your problem. Is the container-entrypoint doing a runcon within it?

from container-selinux.

rhatdan avatar rhatdan commented on August 17, 2024

RHEL7 is not getting updates any longer, so it is not likely this will ever be fixed. Moving to RHEL8 is what I would suggest, or carry the patch that you have or do what I suggest above.

from container-selinux.

bagasse avatar bagasse commented on August 17, 2024

Thanks for your answer. /usr/bin/container-entrypoint is a simple bash script inside the container image, that is used as container entry-point, that, in the end do an exec of passed command. So your first suggestion don't work.

I didn't find any reference of any kind of allow unconfined_service_t container_t:process transition; transition in the repo, so this will still be also relevant on RHEL8 ?

from container-selinux.

rhatdan avatar rhatdan commented on August 17, 2024

What is the script that you are using to launch runc?

from container-selinux.

bagasse avatar bagasse commented on August 17, 2024

Podman is lauched by IBM Workload Scheduler job manager which run in system_u:system_r:unconfined_service_t:s0 context (service managed by systemd). This service launch job commands , and now we start to deliver these jobs via containers. It worked fine with docker (due to the client/server model) but now that we are migrating to podman it break. The IWS service try to launch a podman run command wrapped in a bash script via a sudo rule (to load some podman options and environment for the container, limit access to podman options and make sudo rules management easier)

User twsuser may run the following commands on mymachine:
    (root) NOPASSWD: /opt/mycompany/bin/container-run-cmd *
cat /opt/mycompany/bin/container-run-cmd
#!/bin/bash
# Usage: container-run-cmd job_name [command [options]]
CONTAINER_JOB_NAME=$1
shift

# shellcheck disable=SC1090
. "/etc/${CONTAINER_JOB_NAME}/container.env"
# shellcheck disable=SC2068,SC2086
exec /bin/podman run ${CONTAINER_OPTIONS} --name "${CONTAINER_SERVICE}-$(uuidgen)" "${CONTAINER_IMAGE_NAME}:${CONTAINER_IMAGE_TAG}" $@

from container-selinux.

mohd-akram avatar mohd-akram commented on August 17, 2024

I'm getting this issue in CentOS Stream 9:

$ sudo podman run --rm docker.io/bitnami/mongodb:6.0; echo $?
127

from container-selinux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.