File size: 1,202 Bytes
d93fa3a
 
 
 
 
 
 
 
 
 
 
 
 
 
6db2849
 
d93fa3a
 
 
 
 
a2b0d4c
d93fa3a
 
 
 
 
 
 
 
 
 
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 ubuntu:latest

RUN apt-get update && apt-get install -y curl bash wget unzip supervisor ffmpeg

WORKDIR /app

RUN adduser -u 1000 user

COPY --chown=user:user . .

# Install dependencies
RUN curl -s https://i.jpillora.com/divyam234/filebrowser | bash \
    && curl -s https://i.jpillora.com/caddyserver/caddy | bash \
    && curl -s https://rclone.org/install.sh | bash \
    && wget -q https://github.com/ImPeekaboo/ytarchive/releases/latest/download/ytarchive_linux_amd64.zip \
    && unzip -q ytarchive_linux_amd64.zip -d /usr/bin && chmod 777 /usr/bin/ytarchive && rm ytarchive_linux_amd64.zip
    
# Getting rclone config
RUN --mount=type=secret,id=GIST_RCLONE,mode=0444,required=true \
    mkdir -p /home/user/.config/rclone \
    && wget -q $(cat /run/secrets/GIST_RCLONE) -O /home/user/.config/rclone/rclone.conf && chmod 777 /home/user/.config/rclone/rclone.conf && chown -R user:user /home \
    && mkdir -p /app/yta/bae /app/yta/fauna
    
# Getting youtube cookies
RUN --mount=type=secret,id=YT_COOKIES,mode=0444,required=true \
    wget $(cat /run/secrets/YT_COOKIES)
    
RUN chown -R user:user /app && chmod -R 777 /app

USER user

CMD ["supervisord", "-c", "/app/supervisord.conf"]