aripbae commited on
Commit
2cdee69
·
verified ·
1 Parent(s): 3144f76

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -13
Dockerfile CHANGED
@@ -1,13 +1,31 @@
1
- FROM tsl0922/ttyd:latest
2
-
3
- ENV DEBIAN_FRONTEND noninteractive
4
- RUN apt-get update && apt-get install -y \
5
- nano \
6
- htop \
7
- mc \
8
- curl \
9
- git \
10
- && rm -rf /var/lib/apt/lists/*
11
-
12
- EXPOSE 7860
13
- CMD ["ttyd", "-p", "7860", "-W", "bash"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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;'