Bug 1309727

Summary: Fedora docker image missing sudo
Product: [Fedora] Fedora Reporter: Avi Kivity <avi.kivity>
Component: dockerAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: adimania, admiller, amurdaca, dwalsh, ichavero, jcajka, jchaloup, lsm5, marianne, miminar, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 15:20:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Avi Kivity 2016-02-18 14:56:02 UTC
(note: filed against docker, but meant to file against the official Fedora docker image.  Don't know what the component is for that.)

Description of problem:


To compile-test software, it is convenient to do

   docker run -v /home/avi/software:/home/avi/software -w /home/avi/software -i -t -v /etc/passwd:/etc/passwd -t /etc/sudoers:/etc/sudoers -u avi fedora:rawhide /bin/bash
   $ sudo dnf install toolchain
   $ make (or whatever)

But I can't do that now because sudo is not installed.  I can either run everything as root (and be left with root-owned files in my home directory), or us myself (but not be able to be root in my container).

I could have my own image, but sudo seems useful enough to be in the official image.


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. docker run -i -t  -v /etc/passwd:/etc/passwd -u $(id -un) fedora:rawhide sudo echo yes

Actual results:
exec: "sudo": executable file not found in $PATH


Expected results:
yes

Additional info:

Comment 1 Daniel Walsh 2016-02-18 15:20:01 UTC
I don't believe most people use sudo in a docker container.  I don't believe it should be in the base image.  We are trying to make the base image smaller, not adding to it.

You need to create a layered image.