proton/Dockerfile
2019-01-01 17:01:19 +01:00

59 lines
3.9 KiB
Docker

FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
# Install 64-bit headers
RUN apt-get -y install libx11-dev libv4l-dev libvulkan-dev libmpg123-dev libgsm1-dev libgphoto2-dev libsane-dev libosmesa6-dev libpcap-dev libfontconfig1-dev libfreetype6-dev libxcursor-dev libxi-dev libxxf86vm-dev libxrandr-dev libxfixes-dev libxinerama-dev libxcomposite-dev libglu1-mesa-dev ocl-icd-opencl-dev libdbus-1-dev liblcms2-dev libpulse-dev libudev-dev libkrb5-dev libopenal-dev libldap2-dev libgettextpo-dev libjpeg-dev libcapi20-dev libtiff5-dev \
libcups2-dev libgnutls28-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsdl2-dev libxml2-dev libxslt1-dev oss4-dev
# Install 32-bit headers
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get -y install libx11-dev:i386 libv4l-dev:i386 libvulkan-dev:i386 libmpg123-dev:i386 libgsm1-dev:i386 libgphoto2-dev:i386 libsane-dev:i386 libosmesa6-dev:i386 libpcap-dev:i386 libfontconfig1-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxfixes-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu1-mesa-dev:i386 ocl-icd-opencl-dev:i386 libdbus-1-dev:i386 liblcms2-dev:i386 libpulse-dev:i386 libudev-dev:i386 libkrb5-dev:i386 libopenal-dev:i386 libldap2-dev:i386 libgettextpo-dev:i386 libjpeg-dev:i386 libcapi20-dev:i386 libtiff5-dev:i386
# Ubuntu Bionic has conflicts when installing these 32-bit dev headers along with the 64-bit ones:
# # apt-get -y install libcups2-dev:i386 libgnutls28-dev:i386 libgstreamer1.0-dev:i386 libgstreamer-plugins-base1.0-dev:i386 libsdl2-dev:i386 libxml2-dev:i386 libxslt1-dev:i386
# As a remedy, just extract the conflicting 32-bit dev headers to i386 directory (it won't do any harm).
RUN mkdir /tmp/sub; cd /tmp/sub && \
apt-get download libcups2-dev:i386 libgnutls28-dev:i386 libgstreamer-plugins-base1.0-dev:i386 libgstreamer1.0-dev:i386 libsdl2-dev:i386 libxml2-dev:i386 libxslt1-dev:i386 && \
for i in $(ls *deb); do echo "Extracting $i ..."; dpkg -x $i . ; done && \
cp -rv usr/lib/i386-linux-gnu /usr/lib/ && \
cp -rv usr/include/i386-linux-gnu /usr/include/ && \
rm -rf -- /tmp/sub
# Install common build deps
RUN apt-get install -y \
gcc-8 g++-8 g++-8-multilib flex bison nasm yasm fontforge-nox \
meson mingw-w64 ccache \
libxslt1.1 libxslt1.1:i386 \
libcups2 libcups2:i386 \
libsdl2-2.0-0 libsdl2-2.0-0:i386
# Install vkd3d (Direct3D 12 support) build deps
RUN echo 'APT::Default-Release "bionic";' | tee /etc/apt/apt.conf.d/01lock-release && \
echo 'deb http://archive.ubuntu.com/ubuntu/ disco main universe' | tee /etc/apt/sources.list.d/disco.list && \
apt-get update && \
apt-get -y -t disco install libvkd3d-dev libvkd3d-dev:i386
# Install misc
RUN apt-get -y install gosu less vim binutils git
# Configure gcc/g++ and POSIX mingw-w64 alternative for DXVK
RUN update-alternatives --install "$(command -v gcc)" gcc "$(command -v gcc-8)" 50 && \
update-alternatives --set gcc "$(command -v gcc-8)" && \
update-alternatives --install "$(command -v g++)" g++ "$(command -v g++-8)" 50 && \
update-alternatives --set g++ "$(command -v g++-8)" && \
update-alternatives --install "$(command -v cpp)" cpp-bin "$(command -v cpp-8)" 50 && \
update-alternatives --set cpp-bin "$(command -v cpp-8)" && \
sed -i 's/-gcc-7.2-/-gcc-7.3-/g' /var/lib/dpkg/alternatives/x86_64-w64-mingw32-gcc && \
update-alternatives --set x86_64-w64-mingw32-gcc $(command -v x86_64-w64-mingw32-gcc-posix) && \
update-alternatives --set x86_64-w64-mingw32-g++ $(command -v x86_64-w64-mingw32-g++-posix) && \
sed -i 's/-gcc-7.2-/-gcc-7.3-/g' /var/lib/dpkg/alternatives/i686-w64-mingw32-gcc && \
update-alternatives --set i686-w64-mingw32-gcc $(command -v i686-w64-mingw32-gcc-posix) && \
update-alternatives --set i686-w64-mingw32-g++ $(command -v i686-w64-mingw32-g++-posix)
COPY ./launch /launch
ENTRYPOINT [ "/bin/bash", "/launch" ]
LABEL maintainer="Andrey Arapov <andrey.arapov@nixaid.com>"