Skip to content

Instantly share code, notes, and snippets.

@killwing
Created April 12, 2019 07:18
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 killwing/e509e26b06a2a8e9820e6c38d3df502d to your computer and use it in GitHub Desktop.
Save killwing/e509e26b06a2a8e9820e6c38d3df502d to your computer and use it in GitHub Desktop.
ubuntu image with debugging tools
FROM ubuntu:18.04
ENV LC_ALL=C.UTF-8
ENV TERM=xterm
ADD http://devtools.dl.atlab.ai/docker/PRC-tz /etc/localtime
ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini /usr/local/bin/tini
ADD https://github.com/tobert/pcstat/raw/2014-05-02-01/pcstat.x86_64 /usr/local/bin/pcstat
RUN chmod +x /usr/local/bin/tini && chmod +x /usr/local/bin/pcstat
#RUN sed -i s/archive.ubuntu.com/mirrors.163.com/g /etc/apt/sources.list && \
#RUN sed -i s/security.ubuntu.com/mirrors.163.com/g /etc/apt/sources.list && \
RUN apt update --fix-missing
RUN apt install -y --no-install-recommends \
git unzip vim openssh-server wget curl file \
iputils-ping netcat dstat fio tcpdump htop dnsutils net-tools sysstat ethtool iproute2 pciutils lsof
# Config SSH
# SSH login fix. Otherwise user is kicked off after login
RUN mkdir /var/run/sshd && \
echo 'root:abcd' | chpasswd && \
sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENTRYPOINT ["tini", "--"]
CMD ["tail", "-f", "/dev/null"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment