# Localize docker image

**URL:** <https://forums.docker.com/t/localize-docker-image/44521>\
**Category:** General\
**Tags:** docker\
**Created:** [January 16, 2018, 9:48am UTC](https://forums.docker.com/t/localize-docker-image/44521 "2018-01-16T09:48:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sacarde](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sacarde](https://forums.docker.com/u/sacarde)\
**Post date:** [January 16, 2018, 9:48am UTC](https://forums.docker.com/t/localize-docker-image/44521/1 "2018-01-16T09:48:13Z")

</div>

hi,

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

- can I access/modify this structure?

thank you

---

<div class="post-metadata">

**Author:** ![sdetweil](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@sdetweil](https://forums.docker.com/u/sdetweil)\
**Post date:** [January 16, 2018, 12:42pm UTC](https://forums.docker.com/t/localize-docker-image/44521/2 "2018-01-16T12:42:21Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![sacarde](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sacarde](https://forums.docker.com/u/sacarde)\
**Post date:** [January 16, 2018, 4:30pm UTC](https://forums.docker.com/t/localize-docker-image/44521/3 "2018-01-16T16:30:02Z")

</div>

I run: [docker.io/panubo/vsftpd](http://docker.io/panubo/vsftpd)

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

thank you

---

<div class="post-metadata">

**Author:** ![sdetweil](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@sdetweil](https://forums.docker.com/u/sdetweil)\
**Post date:** [January 16, 2018, 4:57pm UTC](https://forums.docker.com/t/localize-docker-image/44521/4 "2018-01-16T16:57:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sacarde](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sacarde](https://forums.docker.com/u/sacarde)\
**Post date:** [January 16, 2018, 7:21pm UTC](https://forums.docker.com/t/localize-docker-image/44521/5 "2018-01-16T19:21:06Z")

</div>

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

thanks

---

<div class="post-metadata">

**Author:** ![sdetweil](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@sdetweil](https://forums.docker.com/u/sdetweil)\
**Post date:** [January 16, 2018, 7:26pm UTC](https://forums.docker.com/t/localize-docker-image/44521/6 "2018-01-16T19:26:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sacarde](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sacarde](https://forums.docker.com/u/sacarde)\
**Post date:** [January 16, 2018, 7:37pm UTC](https://forums.docker.com/t/localize-docker-image/44521/7 "2018-01-16T19:37:12Z")

</div>

I intend to run the pgm inside the container, using a pre-build image ([docker.io/panubo/vsftpd](http://docker.io/panubo/vsftpd))

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

---

<div class="post-metadata">

**Author:** ![sdetweil](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@sdetweil](https://forums.docker.com/u/sdetweil)\
**Post date:** [January 16, 2018, 7:39pm UTC](https://forums.docker.com/t/localize-docker-image/44521/8 "2018-01-16T19:39:50Z")

</div>

or, extend the image with your additions  
Dockerfile

```auto
from docker.io/panubo/vsftpd

copy .host_file container_file

```

then docker build -t my\_vsftpd ,

then docker run -d … my\_vsftpd

---

<div class="post-metadata">

**Author:** ![sacarde](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sacarde](https://forums.docker.com/u/sacarde)\
**Post date:** [January 16, 2018, 7:45pm UTC](https://forums.docker.com/t/localize-docker-image/44521/9 "2018-01-16T19:45:02Z")

</div>

ah, ok !

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

---

<div class="post-metadata">

**Author:** ![sdetweil](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@sdetweil](https://forums.docker.com/u/sdetweil)\
**Post date:** [January 16, 2018, 7:59pm UTC](https://forums.docker.com/t/localize-docker-image/44521/10 "2018-01-16T19:59:20Z")

</div>

vsfftd.conf  
xferlog\_enable  
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)

---

<div class="post-metadata">

**Author:** ![sacarde](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sacarde](https://forums.docker.com/u/sacarde)\
**Post date:** [January 16, 2018, 8:39pm UTC](https://forums.docker.com/t/localize-docker-image/44521/11 "2018-01-16T20:39:29Z")

</div>

oh, great… it works

thank you very much, you are very kind !!
