forked from Misterblue/vircadia-domain-server-docker
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile-base
83 lines (71 loc) · 3.08 KB
/
Dockerfile-base
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# build a domain-server using vircadia-builder
FROM ubuntu:20.04 as domain-server-build
RUN echo UTC >/etc/timezone
# The tag to pull from the Project Athena source repository. (Note defn in next stage)
ARG REPO=https://github.com/vircadia/vircadia
ARG TAG=master
# Tell the libraries not to use the interactive dialogs
ARG DEBIAN_FRONTEND=noninteractive
ARG TERM=linux
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y git vim libfindbin-libs-perl sudo
RUN mkdir -p /var/lib/vircadia
RUN mkdir -p /opt/vircadia
# && git clone --branch feature-optSkipSystemdRestart https://github.com/misterblue/vircadia-builder.git \
# Get the builder
ADD https://api.github.com/repos/vircadia/vircadia-builder/git/refs/heads/master vircadia-builder-git-version.json
RUN cd /opt/vircadia \
&& git clone https://github.com/vircadia/vircadia-builder.git \
&& cd vircadia-builder \
&& chmod +x vircadia-builder
# Load the required libraries (the first time just loads packages)
# ADD https://api.github.com/repos/vircadia/vircadia/git/refs/heads/${TAG} vircadia-git-version.json
RUN cd /opt/vircadia/vircadia-builder \
&& ./vircadia-builder \
--repo=$REPO \
--tag=$TAG \
--build=domain-server,assignment-client,ice-server \
--release-type=production \
--destdir /opt/vircadia \
--auto
# Create a list of all the source dependencies needed for later phase
RUN cd /opt/vircadia/vircadia-builder \
&& ./vircadia-builder \
--repo=$REPO \
--tag=$TAG \
--destdir /opt/vircadia \
--keep-source \
--get-source-deps ubuntu-20.04 \
--release-type=production \
--auto > /opt/vircadia/builder-deps.txt
# If using the system Qt, get the dependencies for that for later loading
# NOTE: this is an attempt to integrate the system Qt. For the moment, require building Qt
# RUN if [ ! -d /opt/vircadia/qt5-install ] ; then \
# cd /opt/vircadia/vircadia-builder \
# && ./vircadia-builder \
# --repo=$REPO \
# --tag=$TAG \
# --destdir /opt/vircadia \
# --keep-source \
# --get-system-qt-deps >> /opt/vircadia/builder-deps.txt ; \
# fi
# Build the server pieces
ADD https://api.github.com/repos/vircadia/vircadia/git/refs/heads/$TAG vircadia-git-version.json
RUN cd /opt/vircadia/vircadia-builder \
&& ./vircadia-builder \
--repo=$REPO \
--tag=$TAG \
--destdir /opt/vircadia \
--keep-source \
--build=domain-server,assignment-client,ice-server \
--release-type=production \
--skip-systemd-restart \
--auto
# vircadia-builder puts the built image into 'install-$TAG'. Move to "install-master" so later code is simplier
RUN if [ ! -d /opt/vircadia/install-master ] ; then \
mv /opt/vircadia/vircadia_20* /opt/vircadia/install_master ; \
fi
COPY files/buildVersion.sh /tmp
RUN mkdir -p /opt/vircadia/version \
&& /tmp/buildVersion.sh /opt/vircadia/source /opt/vircadia/version $TAG