Skip to content
Snippets Groups Projects
Commit 47d5683a authored by David Trattnig's avatar David Trattnig
Browse files

New build from Debian OPAM2 image.

parent 50214cca
No related branches found
No related tags found
No related merge requests found
###--- Python Stage ---###
FROM ocaml/opam2:debian-10
LABEL maintainer="David Trattnig <david.trattnig@subsquare.at>"
USER root
RUN set -ex \
&& rm -f /usr/bin/python && ln -s /usr/local/bin/python /usr/bin/python \
&& rm -f /usr/bin/python3 && ln -s /usr/local/bin/python3 /usr/bin/python3
# Engine System Dependencies
# System Package Installation
RUN set -ex \
&& apt-get update -q \
&& apt-get install -y -q --no-install-recommends \
supervisor \
RUN apt-get update && sudo apt-get -y install \
apt-utils \
redis-server \
libsndfile1 \
ffmpeg \
quelcom \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
python3-pip \
python-dev \
libmariadbclient-dev \
default-libmysqlclient-dev
# Python Package Installation
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt
# Liquidsoap System Dependencies
RUN apt-get install -qq -yy \
libasound2-dev \
libflac-dev \
libjack-dev \
libmad0-dev \
libmp3lame-dev \
libogg-dev \
libopus-dev \
libpcre3-dev \
libpulse-dev \
libsamplerate0-dev \
libssl-dev \
libtag1-dev \
libvorbis-dev \
m4 \
pkg-config
# Create Users
RUN set -ex \
&& adduser --home /srv --no-create-home --system --uid 1000 --group engineuser \
&& adduser engineuser audio
&& adduser --home /srv --no-create-home --system --uid 1001 --group engineuser \
&& adduser engineuser audio \
&& adduser engineuser opam
# Default configuration
COPY configuration/sample-docker.engine.ini configuration/engine.ini
COPY configuration/sample-docker.gunicorn.conf.py configuration/gunicorn.conf.py
# Initialize the project structure
RUN mkdir -p /srv
RUN mkdir -p /var/log/aura
COPY . /srv
# Own'd
RUN chown -R engineuser:engineuser /srv
RUN chown -R engineuser:engineuser /var/log/aura
RUN chown -R engineuser:engineuser /home/opam
# Liquidsoap Dependencies
# ENGINE INSTALLATION
USER engineuser
WORKDIR /srv
ENV PATH="/home/opam/.local/bin:${PATH}"
# Python Package Installation
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt
# Default configuration
COPY configuration/sample-docker.engine.ini /srv/configuration/engine.ini
COPY configuration/sample-docker.gunicorn.conf.py /srv/configuration/gunicorn.conf.py
# Update OPAM
RUN opam init --disable-sandboxing -y
RUN opam switch create 4.08.0
RUN opam update -y
RUN opam install depext -y
# Liquidsoap Dependencies
RUN opam depext taglib mad lame vorbis flac opus cry samplerate pulseaudio bjack alsa ssl liquidsoap -y
RUN opam install taglib mad lame vorbis flac opus cry samplerate pulseaudio bjack alsa ssl liquidsoap -y
RUN eval $(opam env)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment