Is it possible to create a private temporary Linux environment?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to create a private temporary Linux environment?
Hi,
Lets say i write some code in python 3, but the client have python 2 installed, or not at all.
Is is possible for me to write a shell/other script that will install python which will only be applied to the specific program i wrote? kind of a virtual shell environment that will be temporary and not change any of the user normal environment (including python version)?.
Is it possible to create a private temporary Linux environment?
Indeed, this is exactly what containers are used for, to provide applications with an environment tailored exactly to their needs without tampering with the base OS.
But will it require me to install any 3rd part container?
Quote:
Originally Posted by TobiSGD
Indeed, this is exactly what containers are used for, to provide applications with an environment tailored exactly to their needs without tampering with the base OS.
Is there any simple script that can be added in the bundle but does not require additional environment changes/installation or will it require me to install any 3rd part container? or does linux enable me to do this without anything else installed?
docker is part of any modern release, so you can install it from official repo. That will give you the virtual shell environment you were talking about and you can do what you want inside.
Is it possible to create a private temporary Linux environment?
As pan64 already said,Docker is available for most distributions, documentation is plenty, even video tutorials on YouTube. Alternatively you can look at LXC, which is also widely available, but is not as automated as Docker.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.