-
Notifications
You must be signed in to change notification settings - Fork 133
/
Dockerfile
64 lines (56 loc) · 1.48 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM ubuntu:20.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
git \
build-essential \
cmake \
pkg-config \
qt5-default \
libqt5opengl5-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libprotobuf-dev \
protobuf-compiler \
libode-dev \
libboost-dev
WORKDIR /vartypes
RUN git clone https://github.com/jpfeltracco/vartypes.git . && \
git checkout 2d16e81b7995f25c5ba5e4bc31bf9a514ee4bc42 && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install
WORKDIR /grsim
COPY clients /grsim/clients
COPY cmake /grsim/cmake
COPY config /grsim/config
COPY include /grsim/include
COPY resources /grsim/resources
COPY src /grsim/src
COPY CMakeLists.txt README.md LICENSE.md /grsim/
RUN mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
make && \
make install
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive \
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
RUN apt-get update && apt-get install -y \
tini \
qt5-default \
libqt5opengl5 \
libode8 \
libprotobuf17 \
# virtual display and VNC server
x11vnc xvfb && \
apt-get clean -y
COPY --from=build /usr/local /usr/local
RUN useradd -ms /bin/bash default
COPY /docker-entry.sh .
RUN chmod 775 /docker-entry.sh
EXPOSE 20011 30011 30012 10300 10301 10302 5900
USER default
WORKDIR /home/default
ENTRYPOINT ["tini", "--", "/docker-entry.sh"]