When running the docker file in Teamcity it hangs in fetch apk

I have a docker in my project that looks like

FROM openjdk:17-jdk-alpine


WORKDIR /app


COPY target/Hizam-0.0.1-SNAPSHOT.jar myapp.jar


EXPOSE 8086


ENTRYPOINT ["java", "-jar", "myapp.jar"]

and teamcity runs this docker using the commands in Build Step

docker stop mc-auth-conteiner 2>/dev/null || true
docker rm mc-auth-conteiner
docker build -t mc-auth .
docker run -d --name mc-auth-conteiner --network deploy_network -p 8086:8086 mc-auth

and once teamcity runs the docker it hangs at fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz

What I did try is adding --mtu=1300 in the commands that the teamcity is using as shown below

docker stop mc-auth-conteiner 2>/dev/null || true
docker rm mc-auth-conteiner
docker build -t mc-auth .
docker run -d --name mc-auth-conteiner --network deploy_network --mtu=1300 -p 8086:8086 mc-auth

This approach also didn’t help what am I missing here Thanks in advance.