Last active
May 5, 2022 11:38
-
-
Save seifrajhi/3becd2ac999f067e20216fa899456089 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rajhisaifeddine/ubuntu-ssh-server | |
MAINTAINER Saifeddine RAJHI "https://gist.github.com/seifrajhi/" | |
# create user - ansible - for ssh access and enable sudo operations | |
RUN apt-get update && \ | |
apt-get -y install sudo && \ | |
groupadd -r ansible && \ | |
useradd -rmg ansible ansible && \ | |
echo 'ansible:ansible' |chpasswd && \ | |
echo 'ansible ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \ | |
ln /usr/bin/python3 /usr/bin/python && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
RUN su - ansible -c "mkdir ~/.ssh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment