Answer the question
In order to leave comments, you need to log in
How to access files inside a container?
Good afternoon
How can I access the data inside the container?
A little more. There is a container with an application, in the container there is static data (which can change from build to build) that you need to have access to from the host.
Named volumes are not suitable, because when updating the data inside the container (new image build), they will not be updated.
Bind mount is not suitable because it closes the data in the container with data from the host.
I use docker-compose to run containers
. I essentially need the ability to bind mount from container to host.
Any ideas?
UPD:
The host has nginx that proxies requests to different containers in which applications are running.
some containers have static files that I want to serve with nginx on the host.
Answer the question
In order to leave comments, you need to log in
I read the question and the discussion in the comments.
As far as I understand, if you do everything according to the book, then you need a separate container with nginx for statics. (if we don't want to use external services)
The main idea is that there is no need to climb inside the container. In general, the container is considered in development - Immutable. If there is such a need, then you need to figure out why it is needed and what we are doing wrong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question