Skip to content

Commit

Permalink
Replace npm with yarn as per MBS v-2018-04-23
Browse files Browse the repository at this point in the history
- Update yarnpkg apt repository only.

- Remove cmdtest if already installed as it conflicts with yarn,
  see yarnpkg/yarn#2821

  (Since Ubuntu 17.04, cmdtest is installed by default.)
  • Loading branch information
yvanzo authored and jsturgis committed Jul 6, 2018
1 parent 81709c0 commit 4460fd7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions musicbrainz-dockerfile/Dockerfile
Expand Up @@ -23,9 +23,16 @@ RUN git clone --recursive https://github.com/metabrainz/musicbrainz-server.git m
cd musicbrainz-server && \
git checkout v-2018-06-30

RUN cd tmp && \
RUN cd musicbrainz-server && \
cp docker/yarn_pubkey.txt /tmp && \
cd /tmp && \
apt-key add yarn_pubkey.txt && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update -o Dir::Etc::sourcelist="sources.list.d/yarn.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" && \
curl -sLO https://deb.nodesource.com/node_8.x/pool/main/n/nodejs/nodejs_8.11.3-1nodesource1_amd64.deb && \
dpkg -i nodejs_8.11.3-1nodesource1_amd64.deb
dpkg -i nodejs_8.11.3-1nodesource1_amd64.deb && \
apt remove -y cmdtest && \
apt-get install -y yarn

RUN cd /musicbrainz-server/ && eval $( perl -Mlocal::lib) && cpanm --installdeps --notest .
RUN eval $( perl -Mlocal::lib) && cpanm --notest Plack::Middleware::Debug::Base \
Expand All @@ -52,7 +59,7 @@ ADD scripts/createdb.sh /createdb.sh
ADD scripts/recreatedb.sh /recreatedb.sh
ADD scripts/set-token.sh /set-token.sh

RUN cd /musicbrainz-server/ && npm install --only=production \
RUN cd /musicbrainz-server/ && yarn install --production \
&& eval $( perl -Mlocal::lib) && /musicbrainz-server/script/compile_resources.sh

RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand Down

0 comments on commit 4460fd7

Please sign in to comment.