# How to make image for TOR lxc?

## ayvango

TOR is recommended to run under LXC. For security reasons and to make easier network routing. I would use libvirt to run LXC. The question is how should I get image for TOR?

TOR is installed on the host gentoo system. I need to grab all TOR-related files and make separate file system image with them. There are several possible strategies.

Variant 1: Take TOR binary, make ldd, include all listed libraries. That probably leave some dependencies unresolved. Get an error, see the log and add extra files. Pretty tedious.

Variant 2: Take TOR package and grab all dependencies recursively (use installed-package/CONTENT file to make list). Probably includes many unrelated staff (like gcc)

What is the most practical approach for generating TOR filesystem image? Had anyone solved the same problem already? How?

----------

## khayyam

ayvango ...

you could use docker as container rather than LXC, gentoo provides app-emulation/docker, and app-emulation/s6-overlay, so a docker image similar to this (alpine based) (15mb) image could be created.

I'm actually not very familar with the process, or containers in general, so I offer the above simply as something to look into, and ponder.

best ... khay

----------

