Skip to content

Instantly share code, notes, and snippets.

@olegslavkin
Last active March 28, 2020 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olegslavkin/3e7c703d6f86e755e41c8dd7e3733c78 to your computer and use it in GitHub Desktop.
Save olegslavkin/3e7c703d6f86e755e41c8dd7e3733c78 to your computer and use it in GitHub Desktop.
ARG UBUNTUREL=19.10
FROM ubuntu:$UBUNTUREL
MAINTAINER Oleg Slavkin <oleg@slavkin.info>
ARG DEFUSER=user
ARG DEFUID=1000
ARG DEFGID=1000
RUN sed -i 's\archive.ubuntu.com\mirror.yandex.ru\g' /etc/apt/sources.list && \
sed -i 's\security.ubuntu.com\mirror.yandex.ru\g' /etc/apt/sources.list
RUN apt-get update && apt-get upgrade -y && apt install -y sudo && \
groupadd -g 999 wheel && \
groupadd -g $DEFGID $DEFUSER && \
useradd -M -N -s /bin/bash -u $DEFUID -g $DEFGID -G wheel $DEFUSER
COPY sudoers /etc/sudoers
# sudo docker build --build-arg DEFUSER=$(whoami) --build-arg DEFUID=$(id -u) --build-arg DEFGID=$(id -g) --build-arg UBUNTUREL="19.10" -t $(basename $(pwd)) .
root ALL=(ALL) ALL
%wheel ALL=(ALL) NOPASSWD: ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment