Skip to content

Commit becba30

Browse files
WIP
1 parent e019e20 commit becba30

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

issue-148.dockerfile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
FROM debian:bookworm-slim
2+
3+
RUN <<`
4+
set -e
5+
apt-get update
6+
apt-get upgrade -y
7+
apt-get install -y less nano libjansson4 libjwt0 curl gnupg2 ca-certificates lsb-release debian-archive-keyring
8+
`
9+
10+
RUN <<`
11+
set -e
12+
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor > /usr/share/keyrings/nginx-archive-keyring.gpg
13+
printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx\n" > /etc/apt/sources.list.d/nginx.list
14+
printf "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" > /etc/apt/preferences.d/99nginx
15+
`
16+
17+
RUN <<`
18+
set -e
19+
apt-get update
20+
apt-get install -y nginx
21+
`
22+
23+
WORKDIR /usr/lib/nginx/modules
24+
25+
RUN curl -Ls https://github.com/TeslaGov/ngx-http-auth-jwt-module/releases/download/2.3.0/ngx-http-auth-jwt-module-2.3.1_libjwt-1.15.3_nginx-1.27.4.tgz | tar -zx > ngx_http_auth_jwt_module.so
26+
27+
RUN ln -s /usr/lib/x86_64-linux-gnu/libjwt.so.0 /usr/lib/x86_64-linux-gnu/libjwt.so.2
28+
29+
COPY <<` /etc/nginx/nginx.conf
30+
daemon off;
31+
user nginx;
32+
worker_processes auto;
33+
34+
error_log /dev/stderr notice;
35+
pid /var/run/nginx.pid;
36+
37+
load_module /usr/lib/nginx/modules/ngx_http_auth_jwt_module.so;
38+
39+
events {
40+
worker_connections 1024;
41+
}
42+
43+
http {
44+
include /etc/nginx/mime.types;
45+
default_type application/octet-stream;
46+
47+
auth_jwt_enabled on;
48+
49+
server {
50+
listen 80;
51+
52+
___location / {
53+
return 200 OK;
54+
}
55+
}
56+
}
57+
`
58+
59+
RUN nginx -t
60+
61+
WORKDIR /
62+
CMD [ "nginx" ]

0 commit comments

Comments
 (0)