Skip to content

Instantly share code, notes, and snippets.

Created June 1, 2017 12:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
FROM postgres:9.5.6
ARG DEBIAN_FRONTEND=noninteractive
# removes certain build dependencies that we need, so we
# can't install everything here.
# Note: curl is also a dependency of carton.
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends -y ca-certificates curl sudo && \
rm -rf /var/lib/apt/lists/*
RUN cd /tmp && \
curl -O && \
chmod +x && \
./ && \
RUN useradd --create-home --shell /bin/bash musicbrainz
WORKDIR /home/musicbrainz/musicbrainz-server
RUN mkdir -p /home/musicbrainz/musicbrainz-server && \
chown -R musicbrainz:musicbrainz /home/musicbrainz/musicbrainz-server
docker/musicbrainz-import-database/cpanfile \
docker/musicbrainz-import-database/cpanfile.snapshot \
ENV PERL_CPANM_OPT --notest --no-interactive
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends -y gcc libc6-dev make postgresql-server-dev-9.5 carton postgresql-9.5-pgtap && \
rm -rf /var/lib/apt/lists/* && \
sudo -E -H -u musicbrainz carton install --deployment && \
apt-get purge --auto-remove -y gcc libc6-dev make postgresql-server-dev-9.5
COPY admin/ admin/
COPY lib/ lib/
COPY script/ script/
COPY t/sql/initial.sql t/sql/
COPY docker/musicbrainz-import-database/ lib/
docker/musicbrainz-import-database/ \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment