gigascience / gigadb-website

Source code for running GigaDB
http://gigadb.org
GNU General Public License v3.0
9 stars 15 forks source link

Update dockerfiles to use bullseye #2051

Closed luistoptal closed 1 month ago

luistoptal commented 1 month ago

Pull request for issue: #376

Important: I'm not knowledgeable about devops so I made these changes somewhat in the dark, just to not get stuck and be able to move forward with other tasks, that is why I encourage careful evaluation by a devops engineer whether this should be merged or not, and I also provide steps to replicate / revert it.

The changes can be summarized as:

This PR updates the docker files to make use of debian bullseye. What problem does it solve?

Initially I encountered this issue when running ./up.sh

E: The repository 'http://apt.postgresql.org/pub/repos/apt buster-pgdg Release' does not have a Release file.

Looking at https://apt.postgresql.org/pub/repos/apt/dists/ it looks like the buster repo is no longer available, also this post suggests that buster is EOL / deprecated https://www.postgresql.org/message-id/Zqj_4nlZEqfbQ2aM%40msg.df7cb.de

I replaced all instances of buster by bullseye in the entire codebase, then I run the up.sh script again, and run into this error:

0.841 Err:3 http://security.debian.org bullseye/updates Release
0.841   404  Not Found [IP: 151.101.66.132 80]

which indicates that the bullseye/updates repo does not exist. To fix it I replaced the next code in fuw/docker-pure-ftpd/Dockerfile

ENV DEBIAN_FRONTEND noninteractive
RUN echo "deb http://http.debian.net/debian bullseye main\n\
deb-src http://http.debian.net/debian bullseye main\n\
deb http://http.debian.net/debian bullseye-updates main\n\
deb-src http://http.debian.net/debian bullseye-updates main\n\
deb http://deb.debian.org/debian-security bullseye-security main\n\
deb-src http://deb.debian.org/debian-security bullseye-security main\n\
" > /etc/apt/sources.list

The next error indicates missing deps

=> ERROR [ftpd builder 3/4] RUN apt-get -y update && apt-get -y --force-yes --fix-missing install dpkg-dev debhelper && apt-get -y build-dep pure-ftpd

So in file fuw/docker-pure-ftpd/Dockerfile I replace the following code:

RUN dpkg -i /tmp/pure-ftpd/pure-ftpd-common*.deb && \
  dpkg -i /tmp/pure-ftpd/pure-ftpd_*.deb || true && \
    # dpkg -i /tmp/pure-ftpd/pure-ftpd-ldap_*.deb && \
    # dpkg -i /tmp/pure-ftpd/pure-ftpd-mysql_*.deb && \
    # dpkg -i /tmp/pure-ftpd/pure-ftpd-postgresql_*.deb && \
  apt-get update && apt-get -f install -y && \ # added this so dependencies are fetched
    rm -Rf /tmp/pure-ftpd

After that, the up.sh script worked and the site was accessible locally

How to test?

Run the up.sh script

How have functionalities been implemented?

--

Any issues with implementation?

This PR "works" at least to avoid getting stuck and I believe it should not affect other features in case this PR is not used or replaced by something else

rija commented 1 month ago

Hi @luistoptal, your PR duplicates PR #2049

luistoptal commented 1 month ago

closing because of duplicate of #2049