-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile_with_OPL
73 lines (62 loc) · 1.98 KB
/
Dockerfile_with_OPL
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
FROM ubuntu:20.04
LABEL org.opencontainers.image.source=https://github.com/drdrew42/renderer
MAINTAINER drdrew42
WORKDIR /usr/app
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=America/New_York
RUN apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
apt-utils \
git \
gcc \
npm \
make \
curl \
nodejs \
dvipng \
openssl \
libc-dev \
cpanminus \
libssl-dev \
libgd-perl \
zlib1g-dev \
imagemagick \
libdbi-perl \
libjson-perl \
libcgi-pm-perl \
libjson-xs-perl \
ca-certificates \
libstorable-perl \
libdatetime-perl \
libuuid-tiny-perl \
libtie-ixhash-perl \
libhttp-async-perl \
libnet-ssleay-perl \
libarchive-zip-perl \
libcrypt-ssleay-perl \
libclass-accessor-perl \
libstring-shellquote-perl \
libextutils-cbuilder-perl \
libproc-processtable-perl \
libmath-random-secure-perl \
libdata-structure-util-perl \
liblocale-maketext-lexicon-perl \
&& apt-get clean \
&& rm -fr /var/lib/apt/lists/* /tmp/*
RUN cpanm install Mojo::Base Statistics::R::IO::Rserve Date::Format Future::AsyncAwait Crypt::JWT IO::Socket::SSL CGI::Cookie \
&& rm -fr ./cpanm /root/.cpanm /tmp/*
ENV MOJO_MODE=production
# Clones the OPL into the container. Should be the only difference from ./Dockerfile
RUN curl -sOL "https://github.com/openwebwork/webwork-open-problem-library/archive/refs/heads/master.tar.gz"
RUN tar -zxf master.tar.gz
RUN mkdir webwork-open-problem-library
RUN rm master.tar.gz
RUN mv webwork-open-problem-library-master/OpenProblemLibrary/ webwork-open-problem-library/OpenProblemLibrary/
RUN mv webwork-open-problem-library-master/Contrib/ webwork-open-problem-library/Contrib/
RUN rm -r webwork-open-problem-library-master/
COPY . .
RUN cp render_app.conf.dist render_app.conf
RUN cd lib/WeBWorK/htdocs && npm install && cd ../../..
EXPOSE 3000
HEALTHCHECK CMD curl -I localhost:3000/health
CMD hypnotoad -f ./script/render_app