Skip to content

Commit ab0f581

Browse files
authored
Merge pull request metacpan#2246 from metacpan/oalders/Dockerfile
Don't install npm in Dockerfile
2 parents d3e1fee + 160faef commit ab0f581

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
FROM metacpan/metacpan-base:latest
22

3-
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash \
3+
RUN apt install -f && curl -sL https://deb.nodesource.com/setup_10.x | bash \
4+
&& curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
5+
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
46
&& apt-get update \
5-
&& apt-get install -y nodejs npm \
6-
&& npm install -g yarn
7+
&& apt-get install -y nodejs yarn
78

89
ENV PERL_MM_USE_DEFAULT=1 PERL_CARTON_PATH=/carton
910

1011
COPY . /metacpan-web/
1112
WORKDIR /metacpan-web
1213

14+
RUN yarn install
15+
1316
RUN cpanm --notest App::cpm \
1417
&& cpm install -g Carton \
1518
&& useradd -m metacpan-web -g users \
1619
&& mkdir /carton \
1720
&& cpm install -L /carton \
18-
&& rm -fr /root/.cpanm /root/.perl-cpm /tmp/* \
19-
&& yarn install
21+
&& rm -fr /root/.cpanm /root/.perl-cpm /tmp/*
2022

2123
RUN chown -R metacpan-web:users /metacpan-web /carton
2224

0 commit comments

Comments
 (0)