-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
Dockerfile
56 lines (44 loc) · 1.43 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
49
50
51
52
53
54
55
ARG PYTHON_VERSION=2.7
ARG BASE_IMAGE_DATE=20220421
FROM metabrainz/python:$PYTHON_VERSION-$BASE_IMAGE_DATE
ARG PYTHON_VERSION
ARG BASE_IMAGE_DATE
LABEL org.metabrainz.based-on-image="metabrainz/python:${PYTHON_VERSION}-${BASE_IMAGE_DATE}"
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 #
##################
ARG SIR_VERSION=3.0.1
LABEL org.metabrainz.sir.version="${SIR_VERSION}"
# hadolint ignore=DL3003
RUN git clone --depth=1 --branch "v${SIR_VERSION}" https://github.com/metabrainz/sir.git /code \
&& cd /code \
&& pip install -r requirements.txt \
&& rm -f /code/config.ini \
&& touch /etc/consul-template.conf
WORKDIR /code
ENV MUSICBRAINZ_RABBITMQ_SERVER=mq \
MUSICBRAINZ_POSTGRES_SERVER=db \
MUSICBRAINZ_POSTGRES_READONLY_SERVER=db \
MUSICBRAINZ_SEARCH_SERVER=search:8983/solr
ENV POSTGRES_USER=musicbrainz
ENV POSTGRES_PASSWORD=musicbrainz