Skip to content

Commit 0ecc5c2

Browse files
authored
Merge pull request #899 from metacpan/oalders/docker
Fix fatal Docker errors
2 parents 5044f96 + c35a09a commit 0ecc5c2

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
PGDB=db:5432
2-
API_SERVER=morbo -l http://*:5000 -w /metacpan-api --verbose
2+
API_SERVER=morbo -l http://*:5000 -w . --verbose

Dockerfile

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

3-
ENV PERL_MM_USE_DEFAULT=1 PERL_CARTON_PATH=/carton
3+
ENV PERL_MM_USE_DEFAULT=1
44

55
COPY cpanfile cpanfile.snapshot /metacpan-api/
66
WORKDIR /metacpan-api
@@ -10,18 +10,16 @@ WORKDIR /metacpan-api
1010
# modules is tested by the test suite. Removing the tests, reduces the overall
1111
# size of the images.
1212
RUN useradd -m metacpan-api -g users \
13-
&& mkdir /carton /CPAN \
14-
&& cpm install --without-test -L /carton \
13+
&& mkdir /CPAN \
14+
&& cpm install --global --without-test \
1515
&& rm -fr /root/.cpanm /root/.perl-cpm /var/cache/apt/lists/* /tmp/*
1616

17-
RUN chown -R metacpan-api:users /metacpan-api /carton /CPAN
18-
19-
VOLUME /carton
17+
RUN chown -R metacpan-api:users /metacpan-api /CPAN
2018

2119
VOLUME /CPAN
2220

2321
USER metacpan-api:users
2422

2523
EXPOSE 5000
2624

27-
CMD /wait-for-it.sh ${PGDB} -- carton exec ${API_SERVER} ./bin/api.pl
25+
CMD /wait-for-it.sh ${PGDB} -- ${API_SERVER} ./bin/api.pl

0 commit comments

Comments
 (0)