This repository was archived by the owner on Sep 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (51 loc) · 1.44 KB
/
Dockerfile
File metadata and controls
65 lines (51 loc) · 1.44 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# syntax=docker/dockerfile:1
# Install the base requirements for the app.
# This stage is to support development.
FROM ubuntu:latest AS base
# ARG KOALA_RELEASE
# install prerequisits
######################
RUN \
echo "install packages" && \
apt-get update && \
apt-get install -y \
curl \
jq \
unzip \
python3 \
python3-pip \
python3-venv
RUN apt-get install -y sqlcipher libsqlcipher-dev
RUN \
if [ -z ${KOALA_RELEASE+x} ]; then \
KOALA_RELEASE=$(curl -sX GET "https://api.github.com/repos/KoalaBotUK/KoalaBot/releases/latest" \
| jq -r .tag_name); \
fi && \
KOALA_VER=${KOALA_RELEASE#v} && \
echo "KoalaBot Version "$KOALA_VER && \
curl -o \
/tmp/KoalaBot.zip -L \
"https://github.com/KoalaBotUK/KoalaBot/archive/v${KOALA_VER}.zip" && \
mkdir -p /app && \
unzip /tmp/KoalaBot.zip -d /app && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/* \
/var/tmp/* && \
ls && \
python3 -m venv /opt/venv && \
mv /app/KoalaBot-${KOALA_VER}/* /app && \
rm -r /app/KoalaBot-${KOALA_VER}
WORKDIR /app
RUN /opt/venv/bin/python -m pip install --upgrade pip
RUN /opt/venv/bin/pip install -r requirements.txt
RUN /opt/venv/bin/python -m pip install pysqlcipher3
# docker settings
#################
# map /config to host defined config path (used to store configuration from app)
VOLUME /config
# Expose port
# EXPOSE 5000
# run app
#########
CMD [ "/opt/venv/bin/python", "KoalaBot.py", "--config", "/config/"]