Last active
February 4, 2021 08:22
-
-
Save MrMikeFloyd/9a18ff946d72cd85a9e9b6c1dad01543 to your computer and use it in GitHub Desktop.
Dockerfile for a minimal Ubuntu instance containing a number of LDAP client utilities that allows SSH login and X11 forwarding.
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 ubuntu:latest | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt update && apt install sudo vim inetutils-ping traceroute curl xbase-clients x11-apps openssh-server jxplorer ldapvi ldap-utils -y | |
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 ldapuser | |
RUN echo 'ldapuser:ldappwd' | chpasswd | |
RUN echo 'X11UseLocalhost no' >> /etc/ssh/sshd_config | |
RUN echo 'AddressFamily inet' >> /etc/ssh/sshd_config | |
RUN service ssh start | |
EXPOSE 22 | |
CMD ["/usr/sbin/sshd","-D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build with
docker build -t ldaputils-ubuntu .
, then run it withdocker run -p 2022:22 ldaputils-ubuntu
.