-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 873 Bytes
/
Dockerfile
File metadata and controls
28 lines (22 loc) · 873 Bytes
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
FROM python
RUN apt-get update && apt-get install -y stunnel \
&& cp /etc/ssl/openssl.cnf tmpopenssl.cnf \
&& printf '[SAN]\nsubjectAltName=DNS:music.codethat.rocks, IP:192.168.99.100' >> tmpopenssl.cnf \
&& openssl req \
-new -x509 -days 365 -nodes -out stunnel.pem -keyout stunnel.key \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=music.codethat.rocks" \
-reqexts SAN \
-extensions SAN \
-config tmpopenssl.cnf \
-sha256 \
&& mv stunnel.key stunnel.pem /etc/stunnel/ \
&& chmod 600 /etc/stunnel/stunnel.key
COPY bot /bot
WORKDIR /bot
RUN pip install --no-cache-dir -r requirements.txt
COPY stunnel.conf /etc/stunnel/stunnel.conf
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 5000
CMD ["/entrypoint.sh"]
# Run with: docker run -it -v $(pwd)/bot/current_song:/bot -p 5000:443 music-queue-bot /bin/bash