-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
51 lines (40 loc) · 1.14 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
49
50
51
FROM openresty/openresty:alpine
ENV LIBVIPS_VERSION 8.14.2
WORKDIR /tmp
EXPOSE 8080
RUN apk add --no-cache --virtual build-deps \
gcc g++ make build-base curl perl \
&& \
apk add --no-cache vips vips-dev
RUN /usr/local/openresty/bin/opm install pintsized/lua-resty-http \
&& \
/usr/local/openresty/bin/opm install bungle/lua-resty-prettycjson \
&& \
mkdir -p /usr/local/openresty/site/lualib/net \
&& \
curl https://raw.githubusercontent.com/golgote/neturl/master/lib/net/url.lua -o /usr/local/openresty/site/lualib/net/url.lua
COPY ./helper-lib /tmp/helper-lib
RUN cd /tmp/helper-lib \
&& \
touch * \
&& \
make clean \
&& \
make install \
&& \
cd /tmp \
&& \
rm -rf /tmp/helper-lib \
&& \
ldconfig /usr/local/lib \
&& \
apk del build-deps \
&& \
rm -rf /var/cache/apk/*
COPY ./entrypoint.sh /entrypoint.sh
COPY ./nginx.conf /var/run/openresty-imaging/nginx.conf
COPY ./lib/resty/* /usr/local/openresty/site/lualib/resty/
RUN mkdir -p /var/run/openresty-imaging/logs \
&& \
chmod +x /entrypoint.sh
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]