This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM postgres:9.5.6 | |
ARG DEBIAN_FRONTEND=noninteractive | |
# install_extensions.sh 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 https://raw.githubusercontent.com/metabrainz/docker-postgres/1ce35dc/postgres-base/install_extensions.sh && \ | |
chmod +x install_extensions.sh && \ | |
./install_extensions.sh && \ | |
rm install_extensions.sh | |
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 | |
COPY \ | |
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/DBDefs.pm lib/ | |
COPY \ | |
docker/musicbrainz-import-database/create_test_db.sh \ | |
/docker-entrypoint-initdb.d/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment