forked from metabrainz/sir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (39 loc) · 1.19 KB
/
Dockerfile
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
ARG PYTHON_VERSION=2.7
ARG BASE_IMAGE_DATE=20220421
FROM metabrainz/python:$PYTHON_VERSION-$BASE_IMAGE_DATE
ARG SIR_VERSION
ARG PYTHON_VERSION
ARG BASE_IMAGE_DATE
LABEL org.metabrainz.based-on-image="metabrainz/python:${PYTHON_VERSION}"
LABEL org.opencontainers.image.source https://github.com/lidarr/sir
ARG DEBIAN_FRONTEND=noninteractive
#######################
# From metabrainz/sir #
#######################
RUN apt-get update \
&& apt-get install --no-install-recommends -qy \
ca-certificates \
cron \
gcc \
git \
libc6-dev \
# TODO: check if this is actually needed
libffi-dev \
# required for connections of pip packages
libssl-dev \
# required for psycopg2. Installs without it but links against a wrong .so.
libpq-dev \
# required by lxml from mb-rngpy
libxslt1-dev \
&& rm -rf /var/lib/apt/lists/*
##################
# Installing sir #
##################
WORKDIR /code
COPY . /code/
RUN pip --disable-pip-version-check --no-cache-dir install -r requirements.txt \
&& rm -f /code/config.ini \
&& touch /etc/consul-template.conf \
&& mkdir sql
ENV POSTGRES_USER=musicbrainz
ENV POSTGRES_PASSWORD=musicbrainz