• Mykola Nikishov's avatar
    Really run as non-root user in docker container · 5b2e305f
    Mykola Nikishov authored
    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: default avatarMykola Nikishov <mn@mn.com.ua>
    5b2e305f
Dockerfile 2.85 KB