Skip to content

Instantly share code, notes, and snippets.

@dongwooklee96
Created May 23, 2021 12:02
Show Gist options
  • Save dongwooklee96/45eb9e0723d8b825d8e02dfd8a6e0cb0 to your computer and use it in GitHub Desktop.
Save dongwooklee96/45eb9e0723d8b825d8e02dfd8a6e0cb0 to your computer and use it in GitHub Desktop.
FROM centos:7
RUN useradd dev
RUN echo 'dev:mypass' | chpasswd
RUN yum install -y openssh-server rsync
RUN ssh-keygen -N '' -t rsa -f /etc/ssh/ssh_host_rsa_key && \
ssh-keygen -N '' -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key && \
ssh-keygen -N '' -t ed25519 -f /etc/ssh/ssh_host_ed25519_key
RUN echo /usr/sbin/sshd >> /root/.bashrc && source /root/.bashrc
RUN sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
RUN yum install -y epel-release
RUN yum install -y cmake3
EXPOSE 22
CMD ["/bin/bash"]
# 22 for ssh server. 7777 for gdb server.
EXPOSE 22 7777
RUN useradd -ms /bin/bash debugger
RUN echo 'debugger:pwd' | chpasswd
########################################################
# Add custom packages and development environment here
########################################################
RUN yum update -y && \
yum install -y gcc && \
yum install -y gcc gcc-c++ && \
yum install -y gcc make && \
yum install -y gcc autoconf && \
yum install -y gcc automake && \
yum install -y gcc libtool && \
yum install -y gcc pkgconfig && \
yum install -y gcc cppunit-devel && \
yum install -y gcc python-setuptools && \
yum install -y gcc python-devel && \
yum install -y gcc git && \
yum install -y gcc net-tools && \
yum install -y gcc telnet
########################################################
CMD ["/usr/sbin/sshd", "-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment