Skip to content

Commit 6733b41

Browse files
committed
make the build of dockerfile deterministic
1 parent fee80b4 commit 6733b41

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile.nginx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
FROM openresty/openresty:alpine
1+
FROM alpine:3.21.2 as libjwt-builder
22

33
WORKDIR /home/app
44
RUN apk add --no-cache git cmake make gcc g++ jansson-dev openssl-dev
5+
RUN git clone --depth 1 --branch v3.2.0 https://github.com/benmcollins/libjwt.git && \
6+
mkdir libjwt/build && \
7+
cd libjwt/build && cmake .. && make && make install
58

9+
FROM openresty/openresty:1.27.1.1-1-alpine
610

711
COPY ./nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
812
COPY ./lib/resty/libjwt /usr/local/openresty/lualib/resty/libjwt
913

10-
RUN git clone https://github.com/benmcollins/libjwt.git
11-
RUN mkdir libjwt/build
12-
RUN cd libjwt/build && cmake ..
13-
RUN cd libjwt/build && make && make install
14-
15-
14+
RUN apk add --no-cache jansson
15+
COPY --from=libjwt-builder /usr/local/lib/libjwt.so /usr/local/lib/libjwt.so
1616
EXPOSE 8888
1717
CMD ["openresty", "-g", "daemon off;"]

0 commit comments

Comments
 (0)