From ea1cddfdf3edba702a375381884f1589155fe45d Mon Sep 17 00:00:00 2001 From: nicobo Date: Sun, 7 Feb 2021 23:00:02 +0100 Subject: [PATCH] ~ fixed : /etc/nicobot files were not copied there --- Develop.md | 2 +- Makefile | 6 ++++++ README.md | 9 ++++++++- alpine.Dockerfile | 4 ++-- debian.Dockerfile | 4 ++-- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Develop.md b/Develop.md index 09b4903..1646794 100644 --- a/Develop.md +++ b/Develop.md @@ -165,7 +165,7 @@ Here are the main application files and directories from within the images : ┃ ┗ 📜 ... ┣ 📂 root/ ┃ ┗ 📂 .local/ - ┃ ┣ 📂 bin/ - - - - - - - - - - - - - -> shortcuts + ┃ ┣ 📂 bin/ - - - - - - - - - - - - - -> Executable commands ┃ ┃ ┣ 📜 askbot ┃ ┃ ┣ 📜 docker-entrypoint.sh ┃ ┃ ┣ 📜 transbot diff --git a/Makefile b/Makefile index aa9505c..c9842f1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ build: python3 setup.py build sdist bdist_wheel +build-docker-alpine: + docker build -t nicolabs/nicobot:alpine -f alpine.Dockerfile . + +build-docker-debian-signal: + docker build -t nicolabs/nicobot:signal-debian -f signal-debian.Dockerfile . + build-docker-debian: docker build -t nicolabs/nicobot:debian -f debian.Dockerfile . diff --git a/README.md b/README.md index 4d98869..cf4cf5e 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,14 @@ The container is invoked this way : - `` is either `transbot` or `askbot` - `` is the list of arguments to pass to the bot (see bots' usage) -If any doubt, just invoke the image without argument to print the inline help statement. +You can run the image without any argument to print the inline help statement. + +Noteworthy directories : + +- `/etc/nicobot` contains default, minimalistic configuration files +- `/var/nicobot` is empty but can be overridden with a volume to put custom files, *including secret ones* + +[Develop.md](Develop.md) contains a thorough description of the inner filesystem of the Docker images. Sample command to start a container : diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 2e917d9..407e90b 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -84,7 +84,7 @@ WORKDIR /var/nicobot RUN apk add --no-cache libressl-dev bash # Required by slixmpp-omemo plugin -RUN mkdir -p .omemo +RUN mkdir -p /var/nicobot/.omemo # Signal-cli also creates .signal-cli/ # Not used currently (we just copy the /root/.local directory which has everyting thanks to the --user option) @@ -104,5 +104,5 @@ COPY --from=builder /root/.local /root/.local/ # Otherwise the ENTRYPOINT would simply be [ "python"] # Also copying some default configuration files COPY docker/docker-entrypoint.sh /root/.local/bin/ -COPY docker/default-conf/* . +COPY docker/default-conf/* /etc/nicobot/ ENTRYPOINT [ "docker-entrypoint.sh" ] diff --git a/debian.Dockerfile b/debian.Dockerfile index af53a7f..3d97a09 100644 --- a/debian.Dockerfile +++ b/debian.Dockerfile @@ -60,7 +60,7 @@ FROM python:3-slim WORKDIR /var/nicobot # Required by slixmpp-omemo plugin -RUN mkdir -p .omemo +RUN mkdir -p /var/nicobot/.omemo # Signal-cli also creates .signal-cli/ # Not used currently (we just copy the /root/.local directory which has everyting thanks to the --user option) @@ -80,5 +80,5 @@ COPY --from=builder /root/.local /root/.local/ # Otherwise the ENTRYPOINT would simply be [ "python"] # Also copying some default configuration files COPY docker/docker-entrypoint.sh /root/.local/bin/ -COPY docker/default-conf/* . +COPY docker/default-conf/* /etc/nicobot/ ENTRYPOINT [ "docker-entrypoint.sh" ]