-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
100 lines (91 loc) · 3.25 KB
/
Dockerfile
File metadata and controls
100 lines (91 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
FROM perl:5.42
# Make directories that we expect to use as mountpoints during Kubernetes deployments
RUN mkdir -p /data /run/secrets
# Default debian image tries to clean APT after an install. We're using
# cache mounts instead, so we do not want to clean it.
RUN rm -f /etc/apt/apt.conf.d/docker-clean
RUN --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
echo "deb http://deb.debian.org/debian trixie-backports main" >> /etc/apt/sources.list.d/trixie-backports.list \
&& apt update && apt install -y \
libdbd-mysql-perl \
libdbd-sqlite3-perl
RUN --mount=type=cache,target=/root/.cpanm \
cpanm --notest \
Carton \
Dist::Zilla \
Pod::Weaver::Section::Contributors \
Dist::Zilla::Plugin::Authority \
Dist::Zilla::Plugin::BumpVersionAfterRelease \
Dist::Zilla::Plugin::CPANFile \
Dist::Zilla::Plugin::CheckChangesHasContent \
Dist::Zilla::Plugin::CopyFilesFromBuild \
Dist::Zilla::Plugin::GatherDir \
Dist::Zilla::Plugin::Git::Check \
Dist::Zilla::Plugin::Git::Commit \
Dist::Zilla::Plugin::Git::Contributors \
Dist::Zilla::Plugin::Git::GatherDir \
Dist::Zilla::Plugin::Git::Push \
Dist::Zilla::Plugin::Git::Tag \
Dist::Zilla::Plugin::GithubMeta \
Dist::Zilla::Plugin::MetaJSON \
Dist::Zilla::Plugin::MetaNoIndex \
Dist::Zilla::Plugin::MetaProvides::Package \
Dist::Zilla::Plugin::MetaResources \
Dist::Zilla::Plugin::NextRelease \
Dist::Zilla::Plugin::PodWeaver \
Dist::Zilla::Plugin::Prereqs \
Dist::Zilla::Plugin::Readme::Brief \
Dist::Zilla::Plugin::ReadmeAnyFromPod \
Dist::Zilla::Plugin::RewriteVersion \
Dist::Zilla::Plugin::Run::AfterBuild \
Dist::Zilla::Plugin::Test::Compile \
Dist::Zilla::Plugin::Test::ReportPrereqs \
Dist::Zilla::PluginBundle::Basic \
Dist::Zilla::PluginBundle::Filter \
Software::License::Perl_5 \
CPAN::DistnameInfo \
CPAN::Meta \
CPAN::Testers::Report \
Data::FlexSerializer \
DateTime::Format::SQLite \
Email::Stuffer \
ExtUtils::MakeMaker \
File::Share \
File::ShareDir::Install \
File::Spec \
Import::Base \
IO::Handle \
IPC::Open3 \
JSON::MaybeXS \
Log::Any \
Log::Any::Adapter::MojoLog \
Metabase::User::Profile \
Sereal \
Test::More \
YAML::XS \
OpenTelemetry::SDK \
Mojolicious::Plugin::OpenTelemetry \
Log::Any::Adapter::OpenTelemetry \
IO::Async::Loop::Mojo \
CHI CHI::Driver::Redis
RUN --mount=type=cache,target=/root/.cpanm \
cpanm --notest \
DBD::MariaDB \
DBIx::Class::Storage::DBI::MariaDB \
Mojo::mysql
COPY ./wait-for-it.sh /root/wait-for-it.sh
RUN chmod +x /root/wait-for-it.sh
# Add all distributions in the "dist" directory before any other
# distributions. This way we can have pre-release modules in our dev
# environment. Do this last to take advantage of as much caching as
# possible above, even though any changes here mean rebuilding every
# downstream image...
COPY ./dist /root/dist
RUN --mount=type=cache,target=/root/.cpanm \
bash -vlc 'for DIST in /root/dist/*; do \
echo "Building pre-release: $DIST"; \
cpanm -v -f --notest $DIST; \
done && rm -rf /root/dist'
RUN mkdir /app
WORKDIR /app