Skip to content

Instantly share code, notes, and snippets.

@yashgyy
Forked from minhoryang/Dockerfile
Last active September 20, 2024 02:22
Show Gist options
  • Save yashgyy/2ac9186a43b1c7a8aa1bf6771a464f7c to your computer and use it in GitHub Desktop.
Save yashgyy/2ac9186a43b1c7a8aa1bf6771a464f7c to your computer and use it in GitHub Desktop.
docker-ubuntu-build-essential

docker-ubuntu-build-essential

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment