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
|
# syntax=docker/dockerfile:1
ARG OS_VERSION
## Use the official Debian <OS_VERSION> Image from Dockerhub
FROM docker.io/library/debian:${OS_VERSION}
## Copy OS_VERSION into ENV so we can use it in scripts too
ARG OS_VERSION
ENV OS_VERSION=${OS_VERSION}
ENV PACKAGE_TYPE="DEB"
## Set up environment variables so the tzdata install doesn't
## hang on asking for user input for configuration
ARG DEBIAN_FRONTEND="noninteractive"
ARG TZ="America/New_York"
COPY platform_flags.sh ./platform_flags.sh
## Install the deps and create the build directory
RUN <<EOR
#!/bin/bash -x
if [[ "${OS_VERSION}" == "10" ]]; then
. ./platform_flags.sh
apt-get update
apt-get install -y wget gpg
wget -nc https://apt.kitware.com/keys/kitware-archive-latest.asc
apt-key add kitware-archive-latest.asc
echo 'deb https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
echo 'deb http://deb.debian.org/debian buster-backports main' | tee /etc/apt/sources.list.d/backports.list
export_platform_flags '-DSELF_BUILT_AUBIO=ALWAYS -DSELF_BUILT_JSON=ALWAYS'
apt-get -y update
apt-get -y install libfmt-dev/buster-backports
fi
EOR
RUN <<EOR
#!/bin/bash -x
apt-get update
apt-get install -y --no-install-recommends git cmake build-essential \
gettext help2man libopenblas-dev libfftw3-dev libicu-dev libepoxy-dev \
libsdl2-dev libfreetype6-dev libpango1.0-dev librsvg2-dev libxml++2.6-dev \
libavcodec-dev libavformat-dev libswscale-dev libjpeg-dev \
portaudio19-dev libglm-dev libboost-filesystem-dev \
libboost-iostreams-dev libboost-locale-dev libboost-system-dev \
libboost-program-options-dev libssl-dev libcpprest-dev \
libportmidi-dev libopencv-dev libaubio-dev nlohmann-json3-dev \
libfmt-dev ca-certificates file libgmock-dev libgtest-dev
apt-get clean
mkdir -p /root/performous
EOR
## Copy in the build script to make things easy
COPY build_performous.sh /root/performous/build_performous.sh
COPY run_tests.sh /root/performous/run_tests.sh
WORKDIR /root/performous
|