V
V
Vadim2020-12-09 14:46:14
Docker
Vadim, 2020-12-09 14:46:14

Is the original file kept in the container?

Hello everyone,

while building the image with the docker build command, 2 files are pulled into it, in the Dockerfile, for example, with the commands

COPY conf /etc/clamav
RUN curl -o file.txt http://X.X.X.X/path/to/file/file.txt


while the container is running, these files can be updated by the processes in the container.

1) Correct, do I understand that the original versions of the files are still stored in the upper layers of the container's file system?

2) Can a process in a container access them?

all the best,
Vadim

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2020-12-09
@chupasaurus

  1. Remain in the bottom (the image is a typical stack / pyramid, the layers are superimposed on top of the base), if they were there
  2. It is impossible without mounting from the host, because they are not in the top layer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question