mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Build Docker server images
This commit is contained in:
parent
e1baed3373
commit
158f464c48
5 changed files with 148 additions and 0 deletions
21
tools/ci-scripts/docker_package/Dockerfile_build
Normal file
21
tools/ci-scripts/docker_package/Dockerfile_build
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Docker file for building Overte Server
|
||||
# Example build: docker build -t juliangro/overte-server-build:0.1 -f tools/ci-scripts/docker_package/Dockerfile_build .
|
||||
FROM debian:bullseye
|
||||
LABEL maintainer="Julian Groß (julian.gro@overte.org)"
|
||||
LABEL description="Development image for Overte Domain server and assignment clients."
|
||||
|
||||
# Don't use any frontend when installalling packages during the creation of this container
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN echo UTC >/etc/timezone
|
||||
# Installing via dependency causes interactive hang:
|
||||
RUN apt-get -y install tzdata
|
||||
|
||||
# Install Overte domain-server and assignment-client build dependencies
|
||||
RUN apt-get update && apt-get -y install curl ninja-build git cmake g++ libssl-dev libqt5websockets5-dev qtscript5-dev qtdeclarative5-dev qtmultimedia5-dev
|
||||
|
||||
# Install tools for creating the server image
|
||||
RUN apt-get -y install docker.io xz-utils
|
||||
|
||||
# Install tools needed for our Github Actions Workflow
|
||||
Run apt-get -y install python3-boto3 python3-github zip
|
29
tools/ci-scripts/docker_package/Dockerfile_runtime
Normal file
29
tools/ci-scripts/docker_package/Dockerfile_runtime
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Docker file for overte_server
|
||||
# Example build: docker build -t overte-org/overte_server -f tools/ci-scripts/docker_package/Dockerfile_runtime .
|
||||
FROM docker.io/juliangro/overte-server-base:0.1
|
||||
LABEL maintainer="Julian Groß (julian.gro@overte.org)"
|
||||
LABEL description="Overte Domain server and assignment client image."
|
||||
|
||||
EXPOSE 40100 40101 40102
|
||||
EXPOSE 40100/udp 40101/udp 40102/udp
|
||||
EXPOSE 48000/udp 48001/udp 48002/udp 48003/udp 48004/udp 48005/udp 48006/udp
|
||||
|
||||
RUN mkdir -p /opt/overte/server/plugins /opt/overte/server/resources
|
||||
COPY ./build/assignment-client/assignment-client /opt/overte/server/
|
||||
COPY ./build/domain-server/domain-server /opt/overte/server/
|
||||
COPY ./build/assignment-client/plugins/* /opt/overte/server/plugins/
|
||||
|
||||
COPY ./build/libraries/*/*.so /lib/
|
||||
COPY ./build/domain-server/resources/ /opt/overte/server/resources/
|
||||
COPY ./tools/ci-scripts/docker_package/overte.conf /etc/supervisor/conf.d/overte.conf
|
||||
|
||||
RUN chmod +x /opt/overte/server/domain-server
|
||||
RUN chmod +x /opt/overte/server/assignment-client
|
||||
|
||||
# Ensure `domain-server` and `assignment-client` execute.
|
||||
RUN /opt/overte/server/domain-server --version > /opt/overte/server/version && \
|
||||
/opt/overte/server/assignment-client --version >> /opt/overte/server/version
|
||||
|
||||
RUN apt-get update && apt-get install -y supervisor
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/overte.conf"]
|
15
tools/ci-scripts/docker_package/Dockerfile_runtime_linuxbase
Normal file
15
tools/ci-scripts/docker_package/Dockerfile_runtime_linuxbase
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Docker file for overte_server_base:1.0
|
||||
# Example build: docker build -t overte-org/overte_server_base:1.0 -f tools/ci-scripts/docker_package/Dockerfile_runtime_linuxbase .
|
||||
FROM debian:bullseye-slim
|
||||
LABEL maintainer="Julian Groß (julian.gro@overte.org)"
|
||||
LABEL description="Runtime base-image for Overte Domain server and assignment clients."
|
||||
|
||||
RUN echo UTC >/etc/timezone
|
||||
# Installing via dependency causes interactive hang:
|
||||
RUN apt-get -y install tzdata
|
||||
|
||||
# Update package cache
|
||||
RUN apt-get update
|
||||
|
||||
# Install domain-server and assingment-client runtime dependencies
|
||||
RUN apt-get -y install libqt5network5 libqt5script5 libqt5core5a libstdc++6 libc6 libgcc-s1 zlib1g libgssapi-krb5-2 libdouble-conversion3 libicu67 libpcre2-16-0 libzstd1 libglib2.0-0 libkrb5-3 libk5crypto3 libcom-err2 libkrb5support0 libpcre3 libkeyutils1 libssl1.1 libqt5gui5 libgl1 libpng16-16 libharfbuzz0b libmd4c0 libglvnd0 libglx0 libfreetype6 libgraphite2-3 libx11-6 libbrotli1 libxcb1 libxau6 libxdmcp6 libqt5websockets5 libbsd0 libmd0 libqt5qml5
|
23
tools/ci-scripts/docker_package/README.md
Normal file
23
tools/ci-scripts/docker_package/README.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
This directory contains scripts used for building Linux server Docker images.
|
||||
We are building Debian 11 based images for x86_64 and aarch64.
|
||||
|
||||
To build images for both architectures, you first create them with separate tags (e.g. 0.1-aarch64 and 0.1-amd64), push them,
|
||||
and then you use *docker manifest* to link them together. E.g.:
|
||||
```bash
|
||||
docker manifest create overte-org/overte-server-build:0.1 --amend overte-org/overte-server-build:0.1-amd64 --amend overte-org/overte-server-build:0.1-aarch64
|
||||
```
|
||||
Then you push the manifest similar to how you would push an image:
|
||||
```bash
|
||||
docker manifest push overte-org/overte-server-build:0.1
|
||||
```
|
||||
|
||||
*Dockerfile_build* generates an image that is used to build our Overte Docker Server images. It includes all dependencies for building a server.
|
||||
Current images are available at https://hub.docker.com/repository/docker/juliangro/overte-server-build
|
||||
|
||||
*Dockerfile_runtime_linuxbase* generates a runtime base image for our Server. It includes all dependencies for running a server.
|
||||
Current images are available at https://hub.docker.com/repository/docker/juliangro/overte-server-base
|
||||
|
||||
*Dockerfile_runtime* installs the built server into an image that uses the overte-server-base as a base.
|
||||
The resulting image can be pushed to a Docker repository, or exported, compressed, and published via other means like the https://public.overte.org/index.html
|
||||
|
||||
If you are developing Docker images, you might want to set `DOCKER_BUILDKIT=1` to use a more modern build system that will actually cache each step.
|
60
tools/ci-scripts/docker_package/overte.conf
Normal file
60
tools/ci-scripts/docker_package/overte.conf
Normal file
|
@ -0,0 +1,60 @@
|
|||
[supervisord]
|
||||
user=root
|
||||
nodaemon=true
|
||||
|
||||
[program:domain-server]
|
||||
command=/opt/overte/server/domain-server
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
||||
[program:audio-mixer]
|
||||
command=/opt/overte/server/assignment-client -t 0 -a localhost -p 48000
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
||||
[program:avatar-mixer]
|
||||
command=/opt/overte/server/assignment-client -t 1 -a localhost -p 48001
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
||||
[program:entities-server]
|
||||
command=/opt/overte/server/assignment-client -t 6 -a localhost -p 48006
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
||||
[program:asset-server]
|
||||
command=/opt/overte/server/assignment-client -t 3 -a localhost -p 48003
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
||||
[program:entity-script-server]
|
||||
command=/opt/overte/server/assignment-client -t 5 -a localhost -p 48005
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
||||
[program:messages-mixer]
|
||||
command=/opt/overte/server/assignment-client -t 4 -a localhost -p 48004
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
||||
[program:scripted-agent]
|
||||
command=/opt/overte/server/assignment-client -t 2 -a localhost --max 100
|
||||
autorestart=unexpected
|
||||
directory=/opt/overte/server
|
||||
stderr_logfile=/var/log/overte-err.log
|
||||
stdout_logfile=/var/log/overte-out.log
|
||||
|
Loading…
Reference in a new issue