This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (28 loc) · 1.58 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
36
37
38
39
40
41
# our local base image
FROM ubuntu
LABEL description="Container for use with Visual Studio"
# install build dependencies
RUN apt-get update && apt-get install -y g++ rsync zip openssh-server make gdb cmake git libssl-dev nginx
# configure SSH for communication with Visual Studio
RUN mkdir -p /var/run/sshd
RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config && \
ssh-keygen -A
RUN git clone https://github.com/oktal/pistache.git && cd pistache && git submodule update --init && \
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. && make && make install
RUN git clone https://github.com/whoshuu/cpr.git && cd cpr && git submodule update --init && \
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. && make && make install
# RUN git clone https://github.com/google/googletest.git && cd googletest && \
# mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. && make && make install
# RUN git clone https://github.com/arun11299/cpp-jwt.git && cd cpp-jwt && \
# mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug \
# -DGTEST_LIBRARY=/usr/local/lib/libgtestd.a -DGTEST_MAIN_LIBRARY=/usr/local/lib/libgtest_maind.a .. \
# && make && make install
RUN service ssh start && systemctl enable ssh
RUN useradd -m -d /home/dev -s /bin/bash -G sudo dev
RUN echo "dev:dev" | chpasswd
# expose port 22
EXPOSE 22
EXPOSE 3000
COPY default.conf /etc/nginx/conf.d/default.conf
RUN echo "set auto-load safe-path /" >> /root/.gdbinit
ENTRYPOINT service ssh restart && nginx && bash