Hi,
after cloning git clone https://github.com/rdmorganiser/rdmo-docker-compose.git test into test and issuing make in this dir I encountered the following error:
=> ERROR [rdmo 3/17] RUN rm "$(find /usr/lib/python?.??/ -regex ".*EXTERNALLY-MANAGED.*")" 0.5s
------
> [rdmo 3/17] RUN rm "$(find /usr/lib/python?.??/ -regex ".*EXTERNALLY-MANAGED.*")":
0.398 find: ‘/usr/lib/python?.??/’: No such file or directory
0.399 rm: cannot remove '': No such file or directory
------
failed to solve: process "/bin/sh -c rm \"$(find /usr/lib/python?.??/ -regex \".*EXTERNALLY-MANAGED.*\")\"" did not complete successfully: exit code: 1
make: *** [makefile:24: run_build] Error 17
It seems the current base image does not cotain Externally managed python libs?!
Commenting the offending RUN in the dockerfile
successfully builds the containers, but the won't start:
The postgres container shows:
rdc-postgres exited with code 1
rdc-postgres | The files belonging to this database system will be owned by user "postgres".
rdc-postgres | This user must also own the server process.
rdc-postgres |
rdc-postgres | initdb: error: invalid locale settings; check LANG and LC_* environment variables
rdc-postgres | The files belonging to this database system will be owned by user "postgres".
rdc-postgres | This user must also own the server process.
It seems that the en_US.utf locale is not installed in the container.
This can be fixed by adding RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen in the Dockerfile of the postgres container:
diff --git a/docker/postgres/Dockerfile b/docker/postgres/Dockerfile
index c5f6726..fa7e3b2 100644
--- a/docker/postgres/Dockerfile
+++ b/docker/postgres/Dockerfile
@@ -6,6 +6,10 @@ ENV PATH="${PATH}:/opt:${HOME}/sh"
RUN apt update && apt upgrade -y && apt install -y postgresql-client vim
RUN rm -rf /var/lib/apt/lists/*
+# Set the locale
+RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
+ locale-gen
After cleaning up, e.g.
make run_remove && rm -fr vol && docker volume rm rdcpostgres rdcvol
the rdc-caddy and rdc-postgres container start.
However the rdc-rdmo container complains:
rdc-rdmo | python: can't open file '/vol/rdmo-app/manage.py': [Errno 2] No such file or directory
rdc-rdmo | python: can't open file '/vol/rdmo-app/manage.py': [Errno 2] No such file or directory
rdc-rdmo | python: can't open file '/vol/rdmo-app/manage.py': [Errno 2] No such file or directory
rdc-rdmo | python: can't open file '/vol/rdmo-app/manage.py': [Errno 2] No such file or directory
rdc-rdmo | Run gunicorn
rdc-rdmo | gunicorn failed to start, retry in 60s
This is due to the fact, that sh/prepare.sh creates vol/rdmo-app. If this exists, the rdmo initialisation is skipped.
A fix is:
diff --git a/sh/prepare.sh b/sh/prepare.sh
index 6edbf5b..9ca0db4 100755
--- a/sh/prepare.sh
+++ b/sh/prepare.sh
@@ -61,7 +61,8 @@ cat ${dc_master} | envsubst >${dc_temp}
mkdir -p ${VOLDIR}/log
mkdir -p ${VOLDIR}/postgres
-mkdir -p ${VOLDIR}/rdmo-app
+# rdmo-app will be created by the rdc-rdmo container
+#mkdir -p ${VOLDIR}/rdmo-app
docker_compose_command="docker compose -p ${GLOBAL_PREFIX}"
if ! groups | grep docker >/dev/null 2>&1; then
With these fixes a fresh installation can be done.
Hi, after cloning
git clone https://github.com/rdmorganiser/rdmo-docker-compose.git test
intotest
and issuingmake
in this dir I encountered the following error:It seems the current base image does not cotain Externally managed python libs?! Commenting the offending
RUN
in the dockerfilesuccessfully builds the containers, but the won't start: The postgres container shows:
It seems that the en_US.utf locale is not installed in the container. This can be fixed by adding
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
in the Dockerfile of the postgres container:After cleaning up, e.g.
make run_remove && rm -fr vol && docker volume rm rdcpostgres rdcvol
therdc-caddy
andrdc-postgres
container start. However therdc-rdmo
container complains:This is due to the fact, that
sh/prepare.sh
createsvol/rdmo-app
. If this exists, the rdmo initialisation is skipped. A fix is:With these fixes a fresh installation can be done.