summaryrefslogtreecommitdiff
path: root/LuaSec/1.3.2/Dockerfile
blob: c088d7198dc70d11a1beaa983b0a37952a0b8a5b (plain) (blame)
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
FROM alpine
RUN apk update && apk add \
	make \
	gcc \
	git \
	musl-dev \
	wget
COPY --from=lua:5.4.6 /opt/spm/lua-5.4.6/ /usr/local/
COPY --from=luasocket:3.1.0 /opt/spm/luasocket-3.1.0/ /usr/local/
COPY --from=libopenssl:3.1.1-minimal /opt/spm/openssl-3.1.1/ /usr/local/
RUN wget https://github.com/brunoos/luasec/archive/refs/tags/v1.3.2.tar.gz
RUN tar -xf v1.3.2.tar.gz
WORKDIR /luasec-1.3.2
RUN mkdir patches
COPY 0001-src-Makefile-Generate-static-library.patch patches/
RUN git apply patches/0001-src-Makefile-Generate-static-library.patch
ARG PREFIX=/opt/spm/luasec-1.3.2
RUN make \
    linux \
    CMOD=libluassl.a \
    LNX_CFLAGS="-I/usr/local/include -DWITH_LUASOCKET \
        -ffunction-sections -fdata-sections -Os" \
    LNX_LDFLAGS=

# TODO: install