Docker Program Error and Solution - When Ubuntu Docker Deployment Fails

2025. 2. 5. 11:29개발/개발 필기

반응형

Recently, an urgent error occurred in the program, and after making modifications for deployment,

we encountered a problem where downloading did not happen when trying to run it on Docker.

 

Here, I will share the cause of the issue and the steps taken to resolve it.

 

Cause of the Issue

  1. Server-Docker Relationship Check:
    • There may have been issues related to the IP block between the server and Docker or port issues.
    • Incorrect configuration might also be a possibility.
  2. Code Version Check:
    • It was identified that the code was not updated to the latest version.
  3. Duplicate Execution Check:
    • Two instances of the same program were running on the same server.

Below is my server structure. I marked it simply

서버-도커 관계

 

반응형

Resolution Process

When I executed the command sh dockerRun.sh, it did not proceed with the download and completed immediately. To resolve this, I followed these steps:

sh dockerRun.sh

 

 

1. Stopping and Removing Running Docker Containers:

 

docker stop <<first-container-name>>
docker rm <<first-container-name>>

docker stop <<second-container-name>>
docker rm <<second-container-name>>

 

Relaunching Docker:

  • After cleaning up the containers, I relaunched Docker, and the download proceeded normally, resolving the issue.

 

Conclusion

By systematically analyzing the root cause of the problem and cleaning up the running containers before relaunching,

I was able to resolve the issue.

This approach can serve as a good reference for troubleshooting Docker-related problems in the future.

반응형