-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (25 loc) · 841 Bytes
/
Dockerfile
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
33
34
FROM ruby:3.2.1
WORKDIR /usr/src/app
# Install system dependencies
RUN apt-get update
RUN apt-get install -y libsodium-dev libopus0 ffmpeg opus-tools libopus-dev python3-pip python3-venv
# Install virtual env for Python, because it's dumb
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Install yt-dlp for usage with voice channel commands
RUN pip install yt-dlp
RUN ln -s $(which yt-dlp) /usr/local/bin/youtube-dl
# Install bundler
RUN gem install bundler
# If something changed in the lockfile, explode
RUN bundle config --global frozen 1
# Install Ruby dependencies
COPY Gemfile Gemfile.lock ./
RUN bundle install
# Copy the application / source into the container
COPY ./bin ./bin
COPY ./data ./data
COPY ./lib ./lib
COPY LICENSE .
CMD ["bundle", "exec", "ruby", "bin/run_bot.rb"]