From e5491528c45d9984b5e19bd7befe451b0836c550 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Sat, 31 Jul 2021 05:43:06 +0200 Subject: [PATCH] docker --- Dockerfile | 18 ++++++++++++++++++ docker/docker-init.sh | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 Dockerfile create mode 100644 docker/docker-init.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5a09258 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.9-alpine + +ARG STACOSYS_VERSION=2.0 +ARG STACOSYS_FILENAME=stacosys-${STACOSYS_VERSION}-py3-none-any.whl + +RUN apk update && apk add bash && apk add wget && rm -rf /var/cache/apk/* + +COPY docker/docker-init.sh /usr/local/bin/ +RUN chmod +x usr/local/bin/docker-init.sh + +RUN cd / +#COPY ${STACOSYS_FILENAME} / +RUN wget https://github.com/kianby/stacosys/releases/download/${STACOSYS_VERSION}/${STACOSYS_FILENAME} +RUN python3 -m pip install ${STACOSYS_FILENAME} --target /stacosys +RUN rm -f ${STACOSYS_FILENAME} + +WORKDIR /stacosys +CMD ["docker-init.sh"] diff --git a/docker/docker-init.sh b/docker/docker-init.sh new file mode 100644 index 0000000..b573f35 --- /dev/null +++ b/docker/docker-init.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd /stacosys +python3 run.py /config/config.ini