Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really run as non-root user in docker container #5048

Merged
merged 1 commit into from
Dec 11, 2018
Merged

Really run as non-root user in docker container #5048

merged 1 commit into from
Dec 11, 2018

Commits on Dec 11, 2018

  1. Really run as non-root user in docker container

    As of now,
    
        $ docker pull ipfs/go-ipfs
        Using default tag: latest
        latest: Pulling from ipfs/go-ipfs
        Digest: sha256:31cc5713ef3e3e81bf868cbb56c19de2d15d661743d8b6077804dee26e929ac5
        Status: Image is up to date for ipfs/go-ipfs:latest
    
    ipfs daemon will start as root user:
    
        $ docker run --rm --entrypoint=/bin/sh ipfs/go-ipfs -c whoami
        root
    
    but later on will drop priviledges:
    
        $ docker logs ipfs/go-ipfs |head -n 1
        Changing user to ipfs
    
    With this change applied, ipfs daemon starts as ipfs user right from
    the begining:
    
        $ docker run --rm --entrypoint=/bin/sh ipfs/go-ipfs -c whoami
        ipfs
    
    License: MIT
    Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
    manandbytes authored and Stebalien committed Dec 11, 2018
    Configuration menu
    Copy the full SHA
    5b2e305 View commit details
    Browse the repository at this point in the history