Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FROM ubuntu:16.04
MAINTAINER iganari <iganari@qiita.com>
# apt update
RUN apt-get update
RUN apt-get install -y sudo
# add sudo user
RUN groupadd -g 1000 developer && \
useradd -g developer -G sudo -m -s /bin/bash iganari && \
echo 'iganari:hogehoge' | chpasswd
RUN echo 'Defaults visiblepw' >> /etc/sudoers
RUN echo 'iganari ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER iganari
@iganari

This comment has been minimized.

Copy link
Owner Author

commented Jan 27, 2017

  • 実行コマンド
# docker build --no-cache .
# docker tag $(docker images -q | head -1) sudo-test
# docker run --rm -it sudo-test /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.