-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.develop
48 lines (36 loc) · 1.31 KB
/
Dockerfile.develop
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
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ubuntu:disco AS build
########################################################
# Essential packages for remote debugging and login in
########################################################
RUN apt-get update -y && apt-get install -y \
openssh-server gdb gdbserver
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 debugger
RUN echo 'debugger:pwd' | chpasswd
########################################################
# Add custom packages and development environment here
########################################################
RUN apt-get update && apt-get install -y \
g++ \
ninja-build \
cmake \
python3 \
python3-pip \
git \
flex \
bison \
libtbb-dev \
libprotobuf-dev \
protobuf-compiler
# Required to execute the protoc schema plugin
RUN pip3 install protobuf
########################################################
CMD ["/usr/sbin/sshd", "-D"]