I seem to be missing some very basic utilities, namely the commands sudo
and which
seem to be missing. How can I install these, or even better is there an ami linux image which has all of these kind of things pre-installed.
Dockerfile:
FROM amazonlinux:2.0.20190823.1-with-sources
RUN echo $(which sudo)
Error:
/bin/sh: which: command not found
Or if I just try to use something like sudo yum
/bin/sh: sudo: command not found
Since it seems relevant, I also don't seem to have root permissions as trying to use the adduser
command gives me a non zero response code of 2.
RUN yum update && yum install -y sudo
, sudo is not installed in that image by default. you are already root in that images so you do not need sudo yum – Blantonsudo
in Docker. A container usually runs some single process as a foreground job without user intervention, so you don't usually need an interactive shell in a container, and if you do, you can alwaysdocker exec -u 0
to be root. – Iene