Update Dockerfile
Browse files- Dockerfile +31 -13
Dockerfile
CHANGED
|
@@ -1,13 +1,31 @@
|
|
| 1 |
-
FROM
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
RUN
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM alpine:latest
|
| 2 |
+
|
| 3 |
+
RUN apk add --no-cache nginx ttyd bash curl unzip neofetch font-noto
|
| 4 |
+
RUN curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
|
| 5 |
+
|
| 6 |
+
RUN echo "export PS1='\[\033[01;32m\]root@akkun\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /root/.bashrc
|
| 7 |
+
RUN echo -e "#!/bin/sh\necho akkun" > /usr/local/bin/hostname && \
|
| 8 |
+
chmod +x /usr/local/bin/hostname
|
| 9 |
+
|
| 10 |
+
RUN echo 'events {} http { \
|
| 11 |
+
server { \
|
| 12 |
+
listen 7860; \
|
| 13 |
+
location / { \
|
| 14 |
+
proxy_pass http://127.0.0.1:8080; \
|
| 15 |
+
} \
|
| 16 |
+
location /term/ { \
|
| 17 |
+
proxy_pass http://127.0.0.1:7681; \
|
| 18 |
+
proxy_http_version 1.1; \
|
| 19 |
+
proxy_set_header Upgrade $http_upgrade; \
|
| 20 |
+
proxy_set_header Connection "upgrade"; \
|
| 21 |
+
proxy_set_header X-Real-IP $remote_addr; \
|
| 22 |
+
} \
|
| 23 |
+
} \
|
| 24 |
+
}' > /etc/nginx/nginx.conf
|
| 25 |
+
|
| 26 |
+
WORKDIR /data
|
| 27 |
+
RUN mkdir -p /etc/nginx/logs /run/nginx
|
| 28 |
+
|
| 29 |
+
CMD filebrowser -p 8080 -r /data --noauth -d /tmp/filebrowser.db & \
|
| 30 |
+
ttyd -p 7681 -W -b /term bash & \
|
| 31 |
+
nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
|