You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to install BookWyrm on Ubuntu 24.04, but I am having an issue and receiving an error recommending installing cron. I even tested adding an entry into crontab, and it worked fine.
We get the same error after having to rebuild. These steps don't happen on the vm but while building the Database image based on the postgres-docker Dockerfile. It's based on Postgres:13.0, which is based on debian:buster-20201012-slim, which is EOL since last year and at some point in the recent past postgresql seems to have removed the repositories for buster.
In a local test, I switched the base image to postgres:bookworm (which I find very fitting) and it can install cron with no trouble, but docker entrypoint seems to have moved which leads to problems further in the build:
\> [10/12] RUN awk '$0 ~ /^\t_main "\$@"$/ { print "\tif [[ $1 == cron ]]; then\n\t\techo \"POSTGRES_DB=${POSTGRES_DB}\" > /backups/.env\n\t\techo \"POSTGRES_USER=${POSTGRES_USER}\" >> /backups/.env\n\t\tservice cron start\n\t\tshift\n\tfi" }{ print }' docker-entrypoint.sh > bookwyrm-entrypoint.sh:
0.369 awk: cannot open docker-entrypoint.sh (No such file or directory)
I'm not sure I understand that command correctly. The new container has a docker-entrypoint.sh as well but probably it differs from the first one.
I was, as a workaround, able to get around the issues by changing the docker-compose db section, but that removes the automatic backups.
I guess we need to update the selfbuilt postgres image but I'm lost on the awk command (and maybe, while at it, upgrading to the latest version would prevent future issues with this). We could also switch to mainline postgres and pull the backup functionality out of the production database container.
I am trying to install BookWyrm on Ubuntu 24.04, but I am having an issue and receiving an error recommending installing cron. I even tested adding an entry into crontab, and it worked fine.
` => [db internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.18kB 0.0s
=> [db internal] load metadata for docker.io/library/postgres:13.0 0.2s
=> [db internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [db 1/12] FROM docker.io/library/postgres:13.0@sha256:8f7c3c9b61d82a4a021da5d9618faf056633e089302a726d619fa467c73609e4 0.0s
=> [db internal] load build context 0.0s
=> => transferring context: 86B 0.0s
=> CACHED [db 2/12] RUN mkdir /backups 0.0s
=> CACHED [db 3/12] COPY ./backup.sh /usr/local/bin/bookwyrm-backup.sh 0.0s
=> CACHED [db 4/12] COPY ./weed.sh /usr/local/bin/bookwyrm-weed.sh 0.0s
=> CACHED [db 5/12] COPY ./cronfile /etc/cron.d/cronfile 0.0s
=> ERROR [db 6/12] RUN apt-get update && apt-get -y --no-install-recommends install cron 1.3s
failed to solve: process "/bin/sh -c apt-get update && apt-get -y --no-install-recommends install cron" did not complete successfully: exit code: 100`
The text was updated successfully, but these errors were encountered: