File size: 1,135 Bytes
ab0e375
2cdee69
ab0e375
504d638
ab0e375
 
4001fe7
7a6fee8
 
 
e1b0ef8
2cdee69
 
 
e1b0ef8
 
 
 
2cdee69
 
 
e1b0ef8
2cdee69
 
 
504d638
7a6fee8
e1b0ef8
504d638
7a6fee8
ab0e375
e1b0ef8
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
30
31
32
FROM node:lts-alpine

USER root

RUN apk add --no-cache nginx ttyd bash curl git \
    cairo pango libjpeg-turbo giflib librsvg jq  
RUN curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash

RUN echo "export PS1='\[\033[01;32m\]root@akkun\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /root/.bashrc && \
    echo "export PS1='\[\033[01;32m\]root@akkun\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /etc/profile
RUN echo 'events {} http { \
    server { \
        listen 7860; \
        location / { \
            proxy_pass http://127.0.0.1:8080; \
        } \
        location /term/ { \
            proxy_pass http://127.0.0.1:7681; \
            proxy_http_version 1.1; \
            proxy_set_header Upgrade $http_upgrade; \
            proxy_set_header Connection "upgrade"; \
            proxy_set_header X-Real-IP $remote_addr; \
        } \
    } \
}' > /etc/nginx/nginx.conf

WORKDIR /root
RUN mkdir -p /etc/nginx/logs /run/nginx

CMD filebrowser -p 8080 -r /root --noauth -d /tmp/filebrowser.db & \
    ttyd -p 7681 -W -b /term bash & \
    nginx -c /etc/nginx/nginx.conf -g 'daemon off;'