Discbot/Dockerfile

35 lines
726 B
Docker
Raw Normal View History

2021-10-12 02:44:33 +02:00
FROM archlinux:latest
ENV DEBIAN_FRONTEND=noninteractive
ENV UNAME user
RUN useradd -u 1001 -m -d /home/user -s /bin/sh user && \
usermod -aG audio user
RUN echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
WORKDIR /usr/src/app
RUN pacman -Syud --noconfirm \
base-devel git \
nodejs npm \
pulseaudio \
mpv rtmpdump aria2
RUN mkdir /opt/ytdl && chown user:user /opt/ytdl
USER user
RUN git clone https://aur.archlinux.org/yt-dlp.git /opt/ytdl && \
cd /opt/ytdl && makepkg -sci --noconfirm && sudo ln -s /usr/bin/yt-dlp /usr/bin/youtube-dl
USER root
COPY package*.json ./
RUN npm install
COPY . .
RUN chmod +x run.sh
CMD [ "./run.sh" ]