I am new to docker.
I want to run project by keeping all downloaded libraries to avoid any error when any library is not available anymore.
I though the comment is docker-compose up --no-recreate, however, i pull the code and see the code is updated, but when viewing on the web, it processes with the old code.
what is the right command to run a project by keeping the unupdated library and update what havs been updated?
This pretty much prevents docker-compose to create a new container even if configuration changes, such as the image tag or anything else, have been applied.
The default behavior of docker-compose is to use existing images from the local image cache. If they don’t exist, they will be pulled. As long as you don’t delete an existing image from the local image cache (docker rmi ${image id} or docker image rm ${image id}) docker-compose will use the existing image.
Thus said, what do you mean by pull the code, see the code is updated, it processes with the old code and what is the right command to run a project by keeping the unupdated library and update what havs been updated?
Thanks for your quick reply.
Here is the case (let me try to explain from what my developer told me):
We have file to configure our library
After the first project build, docker-compose up --build, i see the libraries are retrieved and stored in local project folder
We continue with coding
Now we need to run project and since sometime we have new library, we run this docker-compose up --build or docker-compose up. I am not sure it is something related to library file configuration or docker command. After running this, docker-compose up --build, it seems go to remove existing image library file and try to retrieve again the library from internet and when the library is not available anymore on the cloud. we receive error when actually those libaries are already retrieved and stored in local.
This implies that the service in the docker-compose.yml have a build block, which results in creating new images for those services. So the Dockerfile used to build the image, is the one responsible to retrieve the libraries and embed them in the image that is build. When a new image is build, the tag will point to the new created image and the image it pointed to before will be untagged (as in tag=<none>), but won’t be deleted.
WIth the level of vague details, Its hard to assume where things go wrong.
You might want to share the docker-compose.yml and the involved Dockerfiles to actualy allow us to understand what is going on.
Also, may I suggest to take this free fabulous online self paced docker training: Introduction to Containers.