Skip to content

Instantly share code, notes, and snippets.

@tsuzu
Created June 28, 2019 06:41
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 tsuzu/35e8312ce18c5eefbf428992b0e2f11d to your computer and use it in GitHub Desktop.
Save tsuzu/35e8312ce18c5eefbf428992b0e2f11d to your computer and use it in GitHub Desktop.
Ubuntu Docker image with sshd for VSCode Remote
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y openssh-server && \
mkdir /var/run/sshd && \
echo '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 && \
echo "export VISIBLE=now" >> /etc/profile && \
echo 'root:root' | chpasswd
ENV NOTVISIBLE "in users profile"
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