Update Dockerfile
Browse files- Dockerfile +25 -29
Dockerfile
CHANGED
|
@@ -1,44 +1,40 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
| 10 |
-
RUN
|
|
|
|
| 11 |
|
| 12 |
-
RUN echo '
|
| 13 |
-
http { \
|
| 14 |
server { \
|
| 15 |
listen 7860; \
|
| 16 |
location / { \
|
| 17 |
-
proxy_pass http://127.0.0.1:
|
|
|
|
|
|
|
|
|
|
| 18 |
proxy_http_version 1.1; \
|
| 19 |
proxy_set_header Upgrade $http_upgrade; \
|
| 20 |
proxy_set_header Connection "upgrade"; \
|
| 21 |
-
proxy_set_header
|
| 22 |
-
proxy_read_timeout 86400; \
|
| 23 |
} \
|
| 24 |
} \
|
| 25 |
}' > /etc/nginx/nginx.conf
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
ENV HOST=0.0.0.0
|
| 30 |
-
ENV PORT=5577
|
| 31 |
-
ENV DB_PATH=/home/electerm/data
|
| 32 |
-
ENV ENABLE_AUTH=0
|
| 33 |
-
|
| 34 |
-
RUN mkdir -p /home/electerm/data
|
| 35 |
-
|
| 36 |
-
EXPOSE 7860
|
| 37 |
-
|
| 38 |
-
ENTRYPOINT []
|
| 39 |
|
| 40 |
-
CMD
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
cd $(dirname "$SCRIPT") && \
|
| 44 |
-
bash "$SCRIPT"
|
|
|
|
| 1 |
+
FROM alpine:edge
|
| 2 |
|
| 3 |
+
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
|
| 4 |
+
apk add --no-cache \
|
| 5 |
+
nginx ttyd bash curl unzip tmux micro neofetch font-noto \
|
| 6 |
+
python3 py3-pip npm
|
| 7 |
+
RUN curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
|
| 8 |
+
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
| 9 |
|
| 10 |
+
RUN echo "set -g mouse on" > /root/.tmux.conf && \
|
| 11 |
+
echo "set -g status-position top" >> /root/.tmux.conf && \
|
| 12 |
+
echo "set -g base-index 1" >> /root/.tmux.conf && \
|
| 13 |
+
echo "set -g pane-base-index 1" >> /root/.tmux.conf
|
| 14 |
|
| 15 |
+
RUN mkdir -p /root/.config/micro && \
|
| 16 |
+
echo '{"mouse": true, "colorscheme": "simple"}' > /root/.config/micro/settings.json
|
| 17 |
|
| 18 |
+
RUN echo "export PS1='\[\033[01;32m\]root@akkun\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /root/.bashrc
|
| 19 |
+
RUN echo 'events {} http { \
|
| 20 |
server { \
|
| 21 |
listen 7860; \
|
| 22 |
location / { \
|
| 23 |
+
proxy_pass http://127.0.0.1:8080; \
|
| 24 |
+
} \
|
| 25 |
+
location /term/ { \
|
| 26 |
+
proxy_pass http://127.0.0.1:7681; \
|
| 27 |
proxy_http_version 1.1; \
|
| 28 |
proxy_set_header Upgrade $http_upgrade; \
|
| 29 |
proxy_set_header Connection "upgrade"; \
|
| 30 |
+
proxy_set_header X-Real-IP $remote_addr; \
|
|
|
|
| 31 |
} \
|
| 32 |
} \
|
| 33 |
}' > /etc/nginx/nginx.conf
|
| 34 |
|
| 35 |
+
WORKDIR /
|
| 36 |
+
RUN mkdir -p /etc/nginx/logs /run/nginx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
CMD filebrowser -p 8080 -r / --noauth -d /tmp/filebrowser.db & \
|
| 39 |
+
ttyd -p 7681 -W -b /term tmux new -A -s main & \
|
| 40 |
+
nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
|
|
|
|
|
|