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

New build from Debian OPAM2 image.

parent ab1ffe3c
No related branches found
No related tags found
No related merge requests found
###--- Python Stage ---###
FROM ocaml/opam2:debian-10 FROM ocaml/opam2:debian-10
LABEL maintainer="David Trattnig <david.trattnig@subsquare.at>" LABEL maintainer="David Trattnig <david.trattnig@subsquare.at>"
USER root
RUN set -ex \ # Engine System Dependencies
&& 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
# System Package Installation RUN apt-get update && sudo apt-get -y install \
RUN set -ex \ apt-utils \
&& apt-get update -q \
&& apt-get install -y -q --no-install-recommends \
supervisor \
redis-server \ redis-server \
libsndfile1 \ libsndfile1 \
ffmpeg \ ffmpeg \
quelcom \ quelcom \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* python3-pip \
python-dev \
libmariadbclient-dev \
default-libmysqlclient-dev
# Python Package Installation # Liquidsoap System Dependencies
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt 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 # Create Users
RUN set -ex \ RUN set -ex \
&& adduser --home /srv --no-create-home --system --uid 1000 --group engineuser \ && adduser --home /srv --no-create-home --system --uid 1001 --group engineuser \
&& adduser engineuser audio && adduser engineuser audio \
&& adduser engineuser opam
# Default configuration # Initialize the project structure
COPY configuration/sample-docker.engine.ini configuration/engine.ini
COPY configuration/sample-docker.gunicorn.conf.py configuration/gunicorn.conf.py
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 init --disable-sandboxing -y
RUN opam switch create 4.08.0 RUN opam switch create 4.08.0
RUN opam update -y RUN opam update -y
RUN opam install depext -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 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 opam install taglib mad lame vorbis flac opus cry samplerate pulseaudio bjack alsa ssl liquidsoap -y
RUN eval $(opam env) 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