LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-22-2016, 02:45 AM   #1
myewaccc1
LQ Newbie
 
Registered: Mar 2016
Posts: 5

Rep: Reputation: Disabled
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)?.
 
Old 03-22-2016, 02:46 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,602

Rep: Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361
probably linux container or docker will do that for you.
 
Old 03-22-2016, 03:49 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866
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.
 
Old 03-22-2016, 05:08 AM   #4
myewaccc1
LQ Newbie
 
Registered: Mar 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
But will it require me to install any 3rd part container?

Quote:
Originally Posted by TobiSGD View Post
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?

Last edited by myewaccc1; 03-22-2016 at 05:11 AM.
 
Old 03-22-2016, 06:12 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,602

Rep: Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361Reputation: 4361
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.
 
Old 03-22-2016, 10:12 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Create Linux and Windows images for OpenStack private clouds LXer Syndicated Linux News 0 01-13-2014 03:30 PM
[SOLVED] Create unique temporary file name Dafydd Programming 5 12-08-2013 03:24 AM
[SOLVED] Temporary environment variables? pr_deltoid Programming 4 08-05-2010 01:19 AM
Unable to create temporary printer. linx win Debian 1 06-22-2007 07:55 AM
pwmconfig Cannot create temporary file?!? dangerousdave Linux - Software 1 05-01-2006 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration