Solve docker unable to load the service index for source https://api.nuget.org/v3/index.json Questions
When deploying the NETCORE project of Jenkins, the NETCORE project pulled from git was used, and an error was reported, as shown in the figure below
The script I wrote in Jenkins is
docker build --tag jenkinstest:${BUILD_NUMBER} .
At first, I thought that the network Ping was not working. Later, I found that the server could connect to the JSON file WGet by itself, which ruled out this possibility
after the research, it was found that the external network could not be connected in the docker container
Change the sentence to the following
docker build --tag jenkinstest:${BUILD_NUMBER} . --network=host
Similar Posts:
- An error is reported when the docker command is executed in Jenkins
- Install a docker container in centos7 that can log in SSH
- [Solved] Docker Container Start Error: iptables: No chain/target/match by that name
- Solution of docker error checking TLS connection
- [Solved] docker nginx localhost connection refused connect() failed (111: Connection refused)while connecting to upstream
- [Solved] Gitlab can clone via SSH, cannot clone via HTTP, and cannot pipeline. Prompt port 80: connection rejected
- Docker ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [How to Solve]
- docker: Error response from daemon: Conflict. The container name “/xx” is already in use
- “Docker build” requires exactly 1 argument [How to Solve]