Docker Community Forums

Share and learn in the Docker community.

Localize docker image


(Sacarde) #1


  • where can I found images that I download for execution in docker? (which path)

  • can I access/modify this structure?

thank you

(Sam) #2

images (and other docker data) are stored in /var/lib/docker

you cannot change that… BUT, you can make it a symbolic link to somewhere else

stop docker daemon
create new folder, 
copy the contents to the new location
create the link
start docker daemon

(Sacarde) #3

I run:

but I think is not possible to read vsftpd.conf or ftp log
(I dont find them in /var/lib/docker/… )

thank you

(Sam) #4

what is that? those files are not in the docker folder… they are normal app files…

ftp.log would be in the container files or in the host OS location

(Sacarde) #5

sorry, I thought the isolation was complete, configuration files, libraries, executables etc…


(Sam) #6

not quite sure I understand… if you intend to run the pgm INSIDE the container,
the config goes inside the container… and you will not be ale to see that file in any of the docker storage.

if you are running on the host, then the config goes on the host.

(Sacarde) #7

I intend to run the pgm inside the container, using a pre-build image (

I can modify only variables defined by the image’s builder ?

(Sam) #8

or, extend the image with your additions


copy .host_file container_file

then docker build -t my_vsftpd ,

then docker run -d … my_vsftpd

(Sacarde) #9

ah, ok !

for example, if I want to read logfile: vsftpd.log
which is best way to do this?

(Sam) #10

If enabled, a log file will be maintained detailing uploads and downloads. By default, this file will be placed at /var/log/vsftpd.log, but this location may be overridden using the configuration setting xferlog_file.

you might want to dump the image default file
docker exec container_id cat /etc/vsftpd.conf>./vsftpd.conf
then you would make a custom vsftpd.conf,

then in the Dockerfile

copy .vsftpd.conf /etc/vsftpd.conf

then docker build -t etc…

then when you run the your container container and vsftpd runs, the log files will be where you tell them to be

to examine from outside the running container

docker exec container_id cat /var/log/vsftpd.log (or wherever u configured them to be)

(Sacarde) #11

oh, great… it works

thank you very much, you are very kind !!