Skip to content

Dockerfile updates #3060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,20 @@ COPY cpanfile cpanfile.snapshot ./
RUN \
--mount=type=cache,target=/root/.perl-cpm,sharing=private \
<<EOT /bin/bash -euo pipefail
cpm install --show-build-log-on-failure
cpm install --show-build-log-on-failure --resolver=snapshot
EOT

RUN mkdir var && chown metacpan:users var

ENV PERL5LIB="/metacpan-web/local/lib/perl5"
ENV PATH="/metacpan-web/local/bin:${PATH}"

COPY *.md app.psgi *.conf .
COPY *.md app.psgi *.conf ./
COPY bin bin
COPY lib lib
COPY root root
COPY --from=build-assets /build/root/assets root/assets

STOPSIGNAL SIGKILL

CMD [ \
"/uwsgi.sh", \
"--http-socket", ":80" \
Expand All @@ -76,17 +74,12 @@ USER root
RUN \
--mount=type=cache,target=/root/.perl-cpm \
<<EOT /bin/bash -euo pipefail
cpm install --with-develop
cpm install --show-build-log-on-failure --resolver=snapshot --with-develop
chown -R metacpan:users ./
EOT

USER metacpan

CMD [ \
"/uwsgi.sh", \
"--http-socket", ":80" \
]

################### Test Runner
FROM develop AS test
SHELL [ "/bin/bash", "-euo", "pipefail", "-c" ]
Expand Down Expand Up @@ -118,7 +111,7 @@ EOT
RUN \
--mount=type=cache,target=/root/.perl-cpm \
<<EOT /bin/bash -euo pipefail
cpm install --show-build-log-on-failure --with-test
cpm install --show-build-log-on-failure --resolver=snapshot --with-test
EOT

COPY .perlcriticrc .perltidyrc perlimports.toml tidyall.ini ./
Expand Down