Created
January 26, 2019 18:19
-
-
Save rickyngk/1946851bb70505b9b4848cf96e8c38ae to your computer and use it in GitHub Desktop.
OpenResty + Kaltura vod + Kaltura secure token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.8 AS base_image | |
FROM base_image AS build | |
RUN apk add --no-cache curl build-base openssl openssl-dev zlib-dev linux-headers pcre-dev ffmpeg ffmpeg-dev perl | |
RUN mkdir openresty nginx-vod-module nginx-secure-token-module | |
ENV OPENRESTY_VERSION 1.13.6.1 | |
ENV VOD_MODULE_VERSION 1.24 | |
ENV VOD_SECURE_TOKEN_MODULE_VERSION 1.3 | |
RUN curl -sL https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz | tar -C /openresty --strip 1 -xz | |
RUN curl -sL https://github.com/kaltura/nginx-vod-module/archive/${VOD_MODULE_VERSION}.tar.gz | tar -C /nginx-vod-module --strip 1 -xz | |
RUN curl -sL https://github.com/kaltura/nginx-secure-token-module/archive/${VOD_SECURE_TOKEN_MODULE_VERSION}.tar.gz | tar -C /nginx-secure-token-module --strip 1 -xz | |
WORKDIR /openresty | |
RUN ./configure \ | |
-j2 --with-pcre-jit --with-ipv6 \ | |
--add-module=../nginx-vod-module \ | |
--add-module=../nginx-secure-token-module \ | |
--with-http_ssl_module \ | |
--with-file-aio \ | |
--with-threads \ | |
--with-cc-opt="-O3" | |
RUN make -j2 | |
RUN make install | |
RUN rm -rf /usr/local/openresty/html /usr/local/openresty/conf/*.default | |
FROM base_image | |
RUN apk add --no-cache ca-certificates openssl pcre zlib ffmpeg | |
COPY --from=build /usr/local/openresty /usr/local/openresty | |
ENTRYPOINT ["/usr/local/openresty/bin/openresty"] | |
CMD ["-g", "daemon off;"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment