~benaiah/fennel-openresty

ref: aad59afcb0e3cd37cec8165538492f691ebb9061 fennel-openresty/Dockerfile -rw-r--r-- 2.2 KiB
aad59afcBenaiah Mischenko make fennel script in app container executable 3 years ago
                                                                                
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
FROM openresty/openresty:stretch

LABEL maintainer="Benaiah Mischenko <benaiah@mischenko.com>"

WORKDIR /app

COPY . /app

EXPOSE 80

RUN echo "include /app/nginx/conf/nginx.conf;" > /etc/nginx/nginx.conf \
    && echo "include /app/nginx/conf/nginx.conf;" > /usr/local/openresty/nginx/conf/nginx.conf

RUN DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
       apt-utils make openresty-opm rlwrap wget

RUN printf '#!/usr/bin/env bash\nexec rlwrap /app/modules/fennel/fennel "$@"\n' | tee /usr/local/bin/fennel \
    && chmod +x /usr/local/bin/fennel

# RUN mkdir /var/log/postgres \
#     && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
#     && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | DEBIAN_FRONTEND=noninteractive apt-key add - \
#     && DEBIAN_FRONTEND=noninteractive apt-get update \
#     && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends postgresql-11

ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 10.15.1
RUN mkdir $NVM_DIR \
    && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash \
    && . $NVM_DIR/nvm.sh \
    && nvm install $NODE_VERSION \
    && nvm alias default $NODE_VERSION \
    && nvm use default
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | DEBIAN_FRONTEND=noninteractive apt-key add - \
    && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
    && DEBIAN_FRONTEND=noninteractive apt-get remove -y cmdtest \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-transport-https \
    && DEBIAN_FRONTEND=noninteractive apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends yarn

RUN opm get leafo/pgmoon

RUN ln -sf /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
    && make
    
RUN ln -sf /dev/stdout /app/nginx/logs/access.log \
    && ln -sf /dev/stderr /app/nginx/logs/error.log