-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
35 lines (24 loc) · 1.13 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM ubuntu:bionic
########################################################
# Essential packages for remote debugging and login in
########################################################
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
apt-utils gcc g++ openssh-server cmake build-essential gdb gdbserver rsync vim
RUN mkdir /var/run/sshd
RUN echo 'root:root' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
# 22 for ssh server. 7777 for gdb server.
EXPOSE 22 7777
RUN useradd -ms /bin/bash ps
RUN echo 'ps:pwd' | chpasswd
########################################################
# Add custom packages and development environment here
########################################################
RUN apt-get install -y \
git libboost-all-dev
########################################################
CMD ["/usr/sbin/sshd", "-D"]