mirror of
https://github.com/Drakkar-Software/OctoBot.git
synced 2022-03-03 23:52:26 +03:00
[Docker] Add entrypoint with config dump
This commit is contained in:
@@ -18,13 +18,16 @@ FROM python:3.8-slim-buster
|
||||
WORKDIR /octobot
|
||||
COPY --from=base /opt/venv /opt/venv
|
||||
COPY octobot/config /octobot/octobot/config
|
||||
COPY docker-entrypoint.sh docker-entrypoint.sh
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends libxslt-dev libxcb-xinput0 libjpeg62-turbo-dev zlib1g-dev libblas-dev liblapack-dev libatlas-base-dev libopenjp2-7 libtiff-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& ln -s /opt/venv/bin/OctoBot OctoBot # Make sure we use the virtualenv
|
||||
&& ln -s /opt/venv/bin/OctoBot OctoBot # Make sure we use the virtualenv \
|
||||
&& chmod +x docker-entrypoint.sh
|
||||
|
||||
VOLUME /octobot/tentacles
|
||||
VOLUME /octobot/user
|
||||
EXPOSE 5001
|
||||
|
||||
ENTRYPOINT ["./OctoBot"]
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
|
||||
7
docker-entrypoint.sh
Executable file
7
docker-entrypoint.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -n "${OCTOBOT_CONFIG}" ]]; then
|
||||
echo "$OCTOBOT_CONFIG" | tee /octobot/user/config.json > /dev/null
|
||||
fi
|
||||
|
||||
./OctoBot
|
||||
Reference in New Issue
Block a user