S
S
Slava Kryvel2020-01-24 17:53:24
Docker
Slava Kryvel, 2020-01-24 17:53:24

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

3 answer(s)
V
Vitaly Karasik, 2020-01-25
@kryvel

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)

I
Ivan Shumov, 2020-01-24
@inoise

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.

S
sergey, 2020-01-25
kuzmin @sergueik

Vamp can probably make a cluster with a separate docker node, which is just a disk with static files that each build remakes the base image
"from the bowels" seems to me not quite right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question