Skip to content

Instantly share code, notes, and snippets.

@sfdcale
Last active January 10, 2021 05:18
Show Gist options
  • Select an option

  • Save sfdcale/870ef5791110636923419bdf9667a939 to your computer and use it in GitHub Desktop.

Select an option

Save sfdcale/870ef5791110636923419bdf9667a939 to your computer and use it in GitHub Desktop.
Docker Ubuntu instrcutions
  1. Paste the below code in file named Dockerfile
FROM ubuntu
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
    && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8


RUN apt-get update
RUN apt-get install -y sudo

RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

USER docker
  1. Run the command sudo docker build . --tag ubuntu_latest
  2. Run the command docker run --user=docker -it ubuntu_latest bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment