Bug 1309727 - Fedora docker image missing sudo
Summary: Fedora docker image missing sudo
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 14:56 UTC by Avi Kivity
Modified: 2016-02-18 15:20 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 15:20:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.