-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
50 lines (38 loc) · 770 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM alpine as build
RUN apk add --no-cache \
g++ \
make \
cmake \
git \
zlib-dev \
opus-dev \
libsodium-dev \
boost1.82-dev \
openssl-dev
COPY . /app
WORKDIR /app
RUN mkdir build && \
cd build && \
cmake .. && \
cmake --build . --target discord_cpp -j$(nproc --all) && \
cmake --build . --target test_bot -j$(nproc --all)
FROM alpine
RUN apk add --no-cache \
zlib \
opus \
libsodium \
boost1.82 \
boost1.82-filesystem \
openssl \
ffmpeg \
py3-pip
RUN pip install --no-cache-dir youtube_dl
RUN pip cache purge
COPY --from=build /app/build/libdiscord_cpp.so /usr/local/lib
RUN ldconfig /usr/local/lib
RUN mkdir /app
COPY --from=build /app/build/test_bot /app
WORKDIR /app
ARG token
ENV DISCORD_TEST_TOKEN=$token
ENTRYPOINT ["./test_bot"]