skjerns / 3dprintedbrain_docker

3D print your brain from a T1 MRI image using Docker.
BSD 3-Clause "New" or "Revised" License
17 stars 3 forks source link

Cannot prepare internal mirrorlist: No URLs in mirrorlist #1

Open caggursoy opened 2 months ago

caggursoy commented 2 months ago

Hi,

While building the Dockerfile I'm having the following error:

docker build --tag 3dprintedbrain .

Sending build context to Docker daemon  8.729MB
Step 1/10 : FROM freesurfer/freesurfer:7.4.1
 ---> f5c26070586e
Step 2/10 : COPY ./create_3d_brain_docker.sh /opt/create_3d_brain_docker.sh
 ---> Using cache
 ---> 7a119c80464b
Step 3/10 : COPY ./post_process_mesh.py /opt/post_process_mesh.py
 ---> Using cache
 ---> e6e4687aad23
Step 4/10 : COPY ./license.txt /usr/local/freesurfer/license.txt
 ---> Using cache
 ---> 5bd1748a19ce
Step 5/10 : RUN yum install -y python3-pip
 ---> Running in 8507a32298d2
CentOS Stream 8 - AppStream                     113  B/s |  38  B     00:00    
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
The command '/bin/sh -c yum install -y python3-pip' returned a non-zero code: 1

Can you have a look at this?

gianlucafabris commented 1 month ago

in the Dockerfile try to add

RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
RUN sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

before line 10

gianlucafabris commented 1 month ago

for me worked, let me know if it works for you, then I'll do a pull request

skjerns commented 1 month ago

thanks! The suggestions work very well :) I've included them in https://github.com/skjerns/3dprintedbrain_docker/commit/be657c2212edf4a43c15eec789c87e88e371637e

I tried to add you as co-author, but I think that didn't work. just make any other minor change if you want to show up as contributor