Skip to content

Commit 8dfe23f

Browse files
committed
Docker containers
1 parent 67c9577 commit 8dfe23f

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

‎.dex.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,14 @@
2121
desc: "Grab a shell to psql"
2222
shell:
2323
- docker exec -ti blogdb-db psql -U blogdb blogdb
24+
- name: build
25+
desc: "Build packages or containers."
26+
children:
27+
- name: mojo
28+
desc: "Build the mojolicious base container."
29+
shell:
30+
- docker build . -t symkat/mojo -f .docker/mojo.dockerfile
31+
- name: blogdb
32+
desc: "Build the blogdb app container."
33+
shell:
34+
- docker build . -t symkat/blogdb -f .docker/blogdb.dockerfile

‎.docker/blogdb.dockerfile‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM symkat/mojo:latest
2+
3+
USER root
4+
5+
ADD . /home/app/src
6+
RUN chown -R app:app /home/app/src;
7+
8+
USER app
9+
10+
RUN eval $(perl -Mlocal::lib); \
11+
cd /home/app/src/DB; \
12+
dzil build; \
13+
cpanm BlogDB-DB-*.tar.gz ; \
14+
cd /home/app/src/Web; \
15+
cpanm --installdeps .; \
16+
cpanm --installdeps .; \
17+
cpanm --installdeps .;

‎.docker/mojo.dockerfile‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM debian:11
2+
3+
RUN apt-get update; \
4+
apt-get install -y git build-essential libpq-dev libssl-dev libz-dev libexpat1-dev cpanminus liblocal-lib-perl \
5+
postgresql-client postgresql-contrib postgresql python3-psycopg2; \
6+
useradd -U -s /bin/bash -m app;
7+
8+
USER app
9+
RUN eval $(perl -Mlocal::lib); \
10+
echo 'eval $(perl -Mlocal::lib)' >> /home/app/.bashrc; \
11+
cpanm Dist::Zilla Archive::Zip Minion Mojolicious::Plugin::XslateRenderer Mojolicious::Plugin::RenderFile Mojo::Pg \
12+
DateTime::Format::Pg WebService::WsScreenshot LWP::UserAgent XML::RSS Test::Postgresql58 Test::More Test::Deep \
13+
DBIx::Class::InflateColumn::Serializer DBIx::Class::Schema::Config DBIx::Class::DeploymentHandler Data::GUID \
14+
MooseX::AttributeShortcuts MooseX::Getopt DBD::Pg; \
15+
cpanm Dist::Zilla Archive::Zip Minion Mojolicious::Plugin::XslateRenderer Mojolicious::Plugin::RenderFile Mojo::Pg \
16+
DateTime::Format::Pg WebService::WsScreenshot LWP::UserAgent XML::RSS Test::Postgresql58 Test::More Test::Deep \
17+
DBIx::Class::InflateColumn::Serializer DBIx::Class::Schema::Config DBIx::Class::DeploymentHandler Data::GUID \
18+
MooseX::AttributeShortcuts MooseX::Getopt DBD::Pg; \
19+
cpanm Dist::Zilla Archive::Zip Minion Mojolicious::Plugin::XslateRenderer Mojolicious::Plugin::RenderFile Mojo::Pg \
20+
DateTime::Format::Pg WebService::WsScreenshot LWP::UserAgent XML::RSS Test::Postgresql58 Test::More Test::Deep \
21+
DBIx::Class::InflateColumn::Serializer DBIx::Class::Schema::Config DBIx::Class::DeploymentHandler Data::GUID \
22+
MooseX::AttributeShortcuts MooseX::Getopt DBD::Pg; \
23+
cpanm Dist::Zilla Archive::Zip Minion Mojolicious::Plugin::XslateRenderer Mojolicious::Plugin::RenderFile Mojo::Pg \
24+
DateTime::Format::Pg WebService::WsScreenshot LWP::UserAgent XML::RSS Test::Postgresql58 Test::More Test::Deep \
25+
DBIx::Class::InflateColumn::Serializer DBIx::Class::Schema::Config DBIx::Class::DeploymentHandler Data::GUID \
26+
MooseX::AttributeShortcuts MooseX::Getopt DBD::Pg; \
27+
cpanm Dist::Zilla Archive::Zip Minion Mojolicious::Plugin::XslateRenderer Mojolicious::Plugin::RenderFile Mojo::Pg \
28+
DateTime::Format::Pg WebService::WsScreenshot LWP::UserAgent XML::RSS Test::Postgresql58 Test::More Test::Deep \
29+
DBIx::Class::InflateColumn::Serializer DBIx::Class::Schema::Config DBIx::Class::DeploymentHandler Data::GUID \
30+
MooseX::AttributeShortcuts MooseX::Getopt DBD::Pg;

0 commit comments

Comments
 (0)