George S. Baugh 5 år sedan
förälder
incheckning
14d28c5bf8
2 ändrade filer med 38 tillägg och 2 borttagningar
  1. 32 0
      Dockerfile
  2. 6 2
      Makefile

+ 32 - 0
Dockerfile

@@ -0,0 +1,32 @@
+FROM ubuntu:latest
+ARG port=5000
+
+LABEL description="tCMS: a Perl CMS by Troglodyne LLC"
+
+EXPOSE $port/tcp
+
+USER root
+RUN useradd tcms
+RUN apt-get update
+RUN apt-get install -y make apt-utils mlocate
+
+ADD --chown=tcms . /home/tcms
+
+WORKDIR /home/tcms
+
+RUN apt-get install -y locales
+RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
+ENV LANG en_US.utf8
+
+ENV DEBIAN_FRONTEND=noninteractive
+RUN ln -fs /usr/share/zoneinfo/UTC /etc/localtime
+RUN apt-get install -y tzdata
+RUN dpkg-reconfigure --frontend noninteractive tzdata
+
+RUN make depend
+RUN updatedb
+
+USER tcms
+RUN make install
+RUN make reset-dummy-data
+CMD /usr/bin/starman -p $port www/server.psgi

+ 6 - 2
Makefile

@@ -15,7 +15,11 @@ reset-dummy-data:
 
 .PHONY: depend
 depend:
-	sudo apt install -y sqlite3 libsqlite3-dev libdbd-sqlite3-perl cpanminus starman  libcal-dav-perl libtext-xslate-perl libserver-starter-perl libplack-perl libcal-dav-perl libconfig-tiny-perl libdatetime-format-http-perl libjson-maybexs-perl libuuid-tiny-perl libcapture-tiny-perl libconfig-simple-perl libdbi-perl libfile-slurper-perl libfile-touch-perl libfile-copy-recursive-perl libxml-rss-perl libmodule-install-perl
-	sudo cpanm Mojo::File Date::Format WWW::SitemapIndex::XML WWW::Sitemap::XML HTTP::Body Pod::Html URL::Encode
+	apt-get install -y sqlite3 libsqlite3-dev libdbd-sqlite3-perl cpanminus starman libxml2 wget
+	apt-get install -y libtext-xslate-perl libplack-perl libconfig-tiny-perl libdatetime-format-http-perl libjson-maybexs-perl
+	apt-get install -y libuuid-tiny-perl libcapture-tiny-perl libconfig-simple-perl libdbi-perl libfile-slurper-perl libfile-touch-perl
+	apt-get install -y libfile-copy-recursive-perl libxml-rss-perl libmodule-install-perl
+	apt-get install -y libmoose-perl libmoosex-types-datetime-perl libxml-libxml-perl
+	cpanm Mojo::File Date::Format WWW::SitemapIndex::XML WWW::Sitemap::XML HTTP::Body Pod::Html URL::Encode
 	wget -O www/scripts/fgEmojiPicker.js https://github.com/woody180/vanilla-javascript-emoji-picker/raw/master/fgEmojiPicker.js
 	wget -O www/scripts/full-emoji-list.json https://github.com/woody180/vanilla-javascript-emoji-picker/raw/master/full-emoji-list.json