docker build -t ubuntu-build-esssential .
docker run -t -i ubuntu-build-esssential
FROM ubuntu:latest | |
# Update package list and install necessary packages | |
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils build-essential sudo git | |
# Create the 'docker' user, set password, and add the user to the sudo group using 'usermod' | |
RUN useradd -m docker && echo "docker:docker" | chpasswd && usermod -aG sudo docker | |
# Switch to the 'docker' user | |
USER docker |