-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
48 lines (38 loc) · 1.11 KB
/
Dockerfile
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
FROM openresty/openresty:centos
LABEL maintainer="Landon Manning <[email protected]>"
# Build Args
ARG OPENSSL_DIR="/usr/local/openresty/openssl"
# Environment
ENV LAPIS_ENV="production"
# Prepare volumes
VOLUME /var/data
VOLUME /var/www
# Install from Yum
RUN yum -y install \
epel-release \
gcc \
openresty-openssl-devel \
openssl-devel \
sqlite-devel \
; yum clean all
RUN yum config-manager --set-enabled powertools
# Install from LuaRocks
RUN luarocks install luasec
RUN luarocks install bcrypt
RUN luarocks install busted
RUN luarocks install i18n
RUN luarocks install lapis \
CRYPTO_DIR=${OPENSSL_DIR} \
CRYPTO_INCDIR=${OPENSSL_DIR}/include \
OPENSSL_DIR=${OPENSSL_DIR} \
OPENSSL_INCDIR=${OPENSSL_DIR}/include
RUN luarocks install lsqlite3
RUN luarocks install luacov
RUN luarocks install mailgun
RUN luarocks install markdown
# Entrypoint
ADD docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Standard web port (use a reverse proxy for SSL)
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]