I want to create a user with sudo privilages using oracleLinux:7-slim.In the Dockerfile I am using the below code,when I am building an image using this Dockerfile it is failing while creating the user:
FROM oraclelinux:7-slim
RUN yum -y install sudo
RUN useradd -m john && echo "oracle:oracle" | chpasswd && adduser oracle sudo
USER oracle
Note:The above line of code is working if am using ubuntu as a base image instead of oraclelinux:7-slim
Is there a way I can create a user with sudo privileges using oracleLinux:7-slim as a base image?