-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (25 loc) · 1.17 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
FROM ubuntu:20.04
ENV TZ=Europe/Berlin
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && apt-get upgrade -yqq
RUN apt-get install -yqq openssh-server \
build-essential gcc g++ \
gdb clang cmake rsync \
tar wget \
git libuv1-dev libssl-dev zlib1g-dev make \
&& apt-get clean
RUN mkdir /var/run/sshd
RUN echo 'root:wLrebr2*riWESW' | chpasswd
RUN sed -i 's/#*PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd
ENV NOTVISIBLE="in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
WORKDIR /opt
RUN wget -nv https://gitlab.com/libeigen/eigen/-/archive/3.3.8/eigen-3.3.8.tar.gz \
&& tar xvfz eigen-3.3.8.tar.gz && cd eigen-3.3.8 && mkdir build && cd build && cmake .. && make install
RUN git clone https://github.com/uWebSockets/uWebSockets && cd uWebSockets && git checkout e94b6e1 \
&& mkdir build && cd build && cmake .. && make && make install \
&& cd ../.. && ln -s /usr/lib64/libuWS.so /usr/lib/libuWS.so && rm -r uWebSockets
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]