Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.
This repository was archived by the owner on May 6, 2020. It is now read-only.

Unable to run as non-root user in a container #386

Closed
containers/virtcontainers
#345

Description

@GabyCT

Using the following setup:
Ubuntu 16.10
cc-runtime : 3.0.0-alpha.4
OCI specs: 1.0.0-rc5
Docker version 17.06.0-ce, build 02c1d87

It is not possible to run a container as a non-root user

  1. docker run --name test3 -u postgres postgres whoami
    root

It is returning root instead of postgres

Activity

  1. jodh-intel commented on Aug 8, 2017

    @jodh-intel

    Confirmed:

    $ cc-runtime version
    cc-runtime  : 3.0.0-alpha.5
       commit   : bcfc581677cf70ec28c535f94bd63f71ce73c0f6
       OCI specs: 1.0.0-rc5
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 17.04
    Release:        17.04
    Codename:       zesty
    $ docker version
    Client:
     Version:      17.05.0-ce
     API version:  1.29
     Go version:   go1.7.5
     Git commit:   89658be
     Built:        Thu May  4 22:20:42 2017
     OS/Arch:      linux/amd64
    
    Server:
     Version:      17.05.0-ce
     API version:  1.29 (minimum version 1.12)
     Go version:   go1.7.5
     Git commit:   89658be
     Built:        Thu May  4 22:20:42 2017
     OS/Arch:      linux/amd64
     Experimental: false
    $ docker run --runtime=cc30 -it -u postgres alpine whoami
    root
    
    
  2. jodh-intel commented on Aug 8, 2017

    @jodh-intel

    We need to identify if this bug also exists with the new agent or if it is just an issue with hyperstart.

  3. jodh-intel commented on Aug 8, 2017

    @jodh-intel

    It affects both hyperstart and cc-agent.

  4. jodh-intel commented on Aug 8, 2017

    @jodh-intel

    Marking as regression as this works in CC 2.x:

    $ docker run --runtime=cor -it -u postgres alpine whoami
    postgres
    $ cc-oci-runtime version
    cc-oci-runtime version: 2.2.4
    spec version: 1.0.0-rc1
    commit: 8c16c66d9059471fc7d4aaa34f18a8783e57ad32
    
  5. jodh-intel commented on Aug 8, 2017

    @jodh-intel

    @sboeuf - any thoughts on this?

  6. grahamwhaley commented on Aug 8, 2017

    @grahamwhaley
    Contributor

    Just to check - was it fixed in cc-oci-runtime here: https://github.com/01org/cc-oci-runtime/pull/624/files
    ?

  7. added a commit that references this issue on Aug 17, 2017
  8. reopened this on Aug 18, 2017
  9. sboeuf commented on Aug 18, 2017

    @sboeuf

    This is not fixed yet. clearcontainers/agent#82 and containers/virtcontainers#345 have been merged, but we still need #437 to land to get this issue fixed.

  10. devimc commented on Aug 21, 2017

    @devimc

    #437 was merged, closing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions