distintoescuela commited on
Commit
1f45862
·
verified ·
1 Parent(s): c88fa26

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:latest
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y ca-certificates tzdata wget tar curl
5
+
6
+ WORKDIR /app
7
+ COPY . .
8
+ RUN chmod -R 777 /app
9
+
10
+ ## Teldrive
11
+ RUN --mount=type=secret,id=gist_teldrive,mode=0444,required=true \
12
+ latest_version=$(curl -s https://api.github.com/repos/divyam234/teldrive/releases/latest | grep "tag_name" | cut -d'"' -f4) && \
13
+ wget https://github.com/divyam234/teldrive/releases/download/1.4.18/teldrive-1.4.18-linux-amd64.tar.gz -O /app/teldrive.tar.gz && \
14
+ tar xvf /app/teldrive.tar.gz -C /app/ && \
15
+ wget $(cat /run/secrets/gist_teldrive) -O /app/config.toml && \
16
+ chmod a+x /app/teldrive && chmod 777 /app/config.toml && \
17
+ touch /app/session.db && \
18
+ chmod 777 /app/session.db
19
+
20
+ ## Start
21
+ RUN echo '#!/bin/sh\n\n/app/teldrive run' > /app/start.sh && \
22
+ chmod a+x /app/start.sh
23
+
24
+ CMD ["/bin/sh", "/app/start.sh"]