2020-07-18 15:24:06 -05:00
|
|
|
from alpine:latest
|
|
|
|
|
2020-07-23 18:29:56 -05:00
|
|
|
run apk add wget libsodium libsodium-dev cmake pkgconfig sqlite unzip build-base libmagic file-dev perl perl-dev perl-app-cpanminus
|
|
|
|
|
2022-07-19 08:07:11 -05:00
|
|
|
run cpanm --configure-timeout 180 --notest IPC::Run DBD::SQLite Net::DNS::Resolver Crypt::Eksblowfish::Bcrypt JSON URI::Escape HTTP::Accept Net::Server HTTP::Server::Simple HTTP::Server::Simple::Static Crypt::Random Cache::FileCache
|
2020-07-23 18:29:56 -05:00
|
|
|
|
|
|
|
run mkdir -p /tmp/minisign && \
|
|
|
|
cd /tmp/minisign && \
|
|
|
|
wget -O minisign.zip https://github.com/jedisct1/minisign/archive/master.zip && \
|
|
|
|
unzip minisign.zip && \
|
|
|
|
cd minisign-master && \
|
|
|
|
mkdir build && \
|
|
|
|
cd build && \
|
|
|
|
cmake .. && \
|
|
|
|
make && \
|
|
|
|
make install
|
2020-07-18 15:24:06 -05:00
|
|
|
|
2020-07-23 18:45:16 -05:00
|
|
|
run rm -rf /tmp/minisign && \
|
|
|
|
mkdir -p /opt/data/plans
|
|
|
|
|
2020-07-18 15:24:06 -05:00
|
|
|
copy schema.sql /opt/data
|
|
|
|
run cat /opt/data/schema.sql | sqlite3 /opt/data/users.db
|
|
|
|
run rm /opt/data/schema.sql
|
|
|
|
|
2020-07-23 18:29:56 -05:00
|
|
|
run apk del build-base perl-dev perl-app-cpanminus wget sqlite unzip file-dev cmake pkgconfig libsodium-dev
|
2020-07-18 15:24:06 -05:00
|
|
|
|
2020-07-24 00:26:43 -05:00
|
|
|
copy static /opt/static
|
2020-07-18 15:24:06 -05:00
|
|
|
copy server.pl /opt
|
2022-07-19 07:53:14 -05:00
|
|
|
|
|
|
|
run adduser -u 1000 -h /opt -D dotplan
|
|
|
|
run chown -R dotplan:dotplan /opt
|
|
|
|
|
|
|
|
user dotplan
|
2020-07-18 15:24:06 -05:00
|
|
|
workdir /opt
|
|
|
|
|
|
|
|
entrypoint ["/usr/bin/perl", "server.pl"]
|