# Latest Ubuntu LTS release as of November 2022 FROM docker.io/library/ubuntu:22.04 AS Base RUN mkdir /root/zen/ RUN apt-get update ## SETUP PHASE FROM base AS setup # installing software-properties-common needed for add-apt-repository RUN apt-get install -y software-properties-common # adding extra apt repositories for dependencies RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \ add-apt-repository ppa:xmake-io/xmake # installing extra dependecies RUN apt-get update && \ apt-get install -y \ curl \ # netcat \ wget \ xmake \ git \ build-essential \ zip \ pkg-config && \ apt install -y --no-install-recommends g++-11 # installing third party dependencies are provided by Microsoft's vcpkg RUN git clone https://github.com/microsoft/vcpkg.git ~/zen/vcpkg RUN ~/zen/vcpkg/bootstrap-vcpkg.sh ## BUILDING ZENSERVER PHASE FROM setup AS build_zenserver COPY . /root/zen/main RUN export VCPKG_ROOT=~/zen/vcpkg &&\ export XMAKE_ROOT=y &&\ cd ~/zen/main &&\ scripts/ue_build_linux/get_ue_toolchain.sh ./.tmp-ue-toolchain && \ scripts/ue_build_linux/ue_build.sh .tmp-ue-toolchain xmake config -y --mode=debug && \ scripts/ue_build_linux/ue_build.sh .tmp-ue-toolchain xmake build RUN cp ~/zen/main/build/linux/x86_64/debug/zenserver usr/bin/zenserver