-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-BRouterWeb
29 lines (24 loc) · 1.04 KB
/
Dockerfile-BRouterWeb
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
FROM nginx:stable
ARG USER_ID=${USER_ID:-1000}
ARG GROUP_ID=${GROUP_ID:-1000}
ARG BROUTER_WEB_VERSION=0.18.1
RUN apt-get update -y && \
apt-get install -y --no-install-recommends wget unzip && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
RUN usermod -u ${USER_ID} -o nginx && \
groupmod -g ${GROUP_ID} -o nginx && \
mkdir -p /usr/app && \
touch /var/run/nginx.pid && \
## add permissions for nginx user
chown -R ${USER_ID}:${GROUP_ID} /usr/app && \
chown -R nginx:nginx /usr/app && chmod -R 755 /usr/app && \
chown -R nginx:nginx /usr/share/nginx && \
chown -R nginx:nginx /var/cache/nginx && \
chown -R nginx:nginx /var/log/nginx && \
chown -R nginx:nginx /etc/nginx/conf.d && \
chown -R nginx:nginx /var/run/nginx.pid
USER nginx
RUN wget "https://github.com/nrenner/brouter-web/releases/download/${BROUTER_WEB_VERSION}/brouter-web.${BROUTER_WEB_VERSION}.zip" -O /usr/app/brouter-web.zip && \
unzip -o /usr/app/brouter-web.zip -d /usr/share/nginx/html && \
rm -rf /usr/app/brouter-web.zip