forked from metabrainz/musicbrainz-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (40 loc) · 1.27 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
ARG PYTHON_VERSION=2.7
ARG BASE_IMAGE_DATE=20190302
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=1.0.2
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 POSTGRES_USER=musicbrainz
ENV POSTGRES_PASSWORD=musicbrainz