diff --git a/Build/Dockerfile b/Build/Dockerfile index 2387b618..395aecbd 100644 --- a/Build/Dockerfile +++ b/Build/Dockerfile @@ -29,8 +29,20 @@ RUN dnf -y module enable python39 && \ # RUN dnf -y install libicu libicu-devel # Free Pascal 3.0.4 -RUN (cd /opt && curl -O -L 'http://downloads.sourceforge.net/project/freepascal/Linux/3.0.4/fpc-3.0.4-1.x86_64.rpm' \ - && rpm -i fpc-3.0.4-1.x86_64.rpm) +RUN cd /opt && \ + curl -L -H "Accept: */*" -H "Accept-Language: en-US,en;q=0.9" \ + -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36" \ + -o fpc-3.0.4-1.x86_64.rpm \ + 'https://sourceforge.net/projects/freepascal/files/Linux/3.0.4/fpc-3.0.4-1.x86_64.rpm/download' && \ + FILE_SIZE=$(stat -c%s fpc-3.0.4-1.x86_64.rpm 2>/dev/null || echo 0) && \ + if [ "$FILE_SIZE" -lt 1000000 ]; then \ + echo "Downloaded file too small ($FILE_SIZE bytes), trying alternative URL..."; \ + rm -f fpc-3.0.4-1.x86_64.rpm; \ + curl -L -f -o fpc-3.0.4-1.x86_64.rpm 'http://downloads.sourceforge.net/project/freepascal/Linux/3.0.4/fpc-3.0.4-1.x86_64.rpm'; \ + fi && \ + [ $(stat -c%s fpc-3.0.4-1.x86_64.rpm) -gt 1000000 ] && \ + rpm -i fpc-3.0.4-1.x86_64.rpm && \ + rm -f fpc-3.0.4-1.x86_64.rpm # Go RUN (cd /opt && curl -O -L https://golang.org/dl/go1.17.2.linux-amd64.tar.gz && tar zxvf go1.17.2.linux-amd64.tar.gz)