sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.61k stars 1.51k forks source link

[ idea ] Develop a docker model using sandboxie. #3717

Open woeoio opened 6 months ago

woeoio commented 6 months ago

Is your feature request related to a problem or use case?

I would like to make a suggestion. As we all know, docker under windows is based on a virtual machine running a linux system, which is very heavy.

Until I discovered that win10 comes with sandbox, a very lightweight shadow system that behaves much like docker under linux and supports simple custom configuration file startup.

But after testing, I found that it didn't satisfy my original idea, because it can only run one instance, and the configuration item is not enough to accomplish the functions required by docker.

I have sent this suggestion to windows's user feedback channel, but so far there has been no message.

Until recently, I found sandboxie-plus, which I think is a good direction. I hope your development team can consider implementing a branch project similar to docker based on it, even if it only supports windows system.

Specifically, the idea is to allow users to start a sandboxie instance by defining a configuration file (similar to docker compose), in which the required software services can be run as needed.

You can refer to the model and principle of docker. I think it will be a great success. I hope to adopt it. Thank you

Describe the solution you'd like

As mentioned earlier. Thank you

Describe alternatives you've considered

No response

woeoio commented 6 months ago

When sandboxie is dockerized, the value and potential that can be produced are unlimited. Just imagine why Windows often reinstalls the system to solve various environmental problems and slows down. It is because after all kinds of software is installed, it destroys the system environment and produces unlimited garbage to slow down the system performance.

If sandboxie implements dockerization, it will bring great convenience to operation and maintenance, and even bring a series of automated operation and maintenance ecology, just like docker to K8s.

Even for individual users, it is also a great convenience. People no longer have to worry about a series of troubles caused by installing office software, and conflicts between software and systems can be easily solved by destroying container instances with one click instead of reinstalling the system.

For some temporary software, you don't have to worry about residual garbage after it is installed into the system. In particular, a lot of rogue software brings unimaginable damage to the system.

The benefit of all this is based on the existence of a native Windows docker service in the world. And sandboxie is the most promising, so don't expect Microsoft to do it. They don't listen to any idea.

At present, all the software images in docker hub are run for Linux, and the docker in Windows is a Linux service running in a virtual machine. Therefore, there is an urgent need to have a native Windows docker service, run existing Windows software, and build Windows docker hub and ecology.

It's you, sandboxie.

hihihlo commented 6 months ago

@woeoio From Google search results, it seems that many people are currently using WSL Docker on Windows already

xsmolasses commented 6 months ago

@DavidXanatos has actually laid such a foundation in Sandboxie with the very hurts-my-brain convoluted Snapshots feature!

Exploiting it, I have been doing rudimentary Dockery things with it.

For functionality Docker is designed, right off the bat, Sandboxie has bested Docker at its own game.

Where you have to bake in your dependencies with Docker files, Sandboxie can layer Snapshots nigh dynamically!

It's the real deal. Right here, the keys to the kingdom:

Would only need to fully script it and/or create a package manager project around it: (may I suggest DwarFS for archives)

I thought about writing it AND hosting a software repository on a read-only virtual NVMe by way of imdisk / devio.

A solitary Cloud proof-of-concept kicks off the [Windows] software-as-a-service choose-your-own-server revolution! Viruses be damned..! We're Sandboxie'd! Disclaimer: subject to NT security flaws galore, and copyright legalities.

Sandboxie.ini

[Sandman_package_python_2718]
#Enabled=n
FileRootPath=A:\Sandman\python-2.7.18.amd64

[Sandman_package_python_3913]
#Enabled=n
FileRootPath=A:\Sandman\python-3.9.13-amd64

[Sandman_package_gimp_21034]
#Enabled=n
FileRootPath=A:\Sandman\gimp-2.10.34-setup-2

[Sandman_package_gimp_21036]
#Enabled=n
FileRootPath=A:\Sandman\gimp-2.10.36-setup

[a_lousy_example]
Enabled=y
FileRootPath=C:\Sandbox\%USER%\%SANDBOX%

# encountered a weird bug: if drive\C\Windows\System32 NOT exist in this Sandbox...
# but exists in any of the [symbolically linked] snapshots, throws critical errors!

# dependencies
#ReadFilePath=|A:\Sandman\python-2.7.18.amd64\*
ReadFilePath=|A:\Sandman\python-3.9.13-amd64\*

# applications
#ReadFilePath=|A:\Sandman\gimp-2.10.34-setup-2\*
ReadFilePath=|A:\Sandman\gimp-2.10.36-setup\*

# interestingly, user\current is not carried over but user\all is
StartProgram=CMD /C START "" CMD /K "A:\Sandman\python-3.9.13-amd64\user\current\AppData\Local\Programs\Python\Python39\python.exe"

# so be sure to install our "Sandman" packages for All Users and/or into Program Files [(x86)]
StartProgram=CMD /C START "" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\GIMP 2.10.36.lnk"

Command Prompt / Script

SET "USER=%USERNAME%"
SET "SANDBOX=a_lousy_example"

SET "Sandbox_FileRootPath=C:\Sandbox\%USER%\%SANDBOX%"
SET "Sandman_snapshot_1_FileRootPath=A:\Sandman\python-3.9.13-amd64"
SET "Sandman_snapshot_2_FileRootPath=A:\Sandman\gimp-2.10.36-setup"

MKDIR "%Sandbox_FileRootPath%"

RMDIR "%Sandbox_FileRootPath%\snapshot-1"
MKLINK /J "%Sandbox_FileRootPath%\snapshot-1" "%Sandman_snapshot_1_FileRootPath%"
:: Junction created for C:\Sandbox\xsmolasses\a_lousy_example\snapshot-1 <<===>> A:\Sandman\python-3.9.13-amd64

RMDIR "%Sandbox_FileRootPath%\snapshot-2"
MKLINK /J "%Sandbox_FileRootPath%\snapshot-2" "%Sandman_snapshot_2_FileRootPath%"
:: Junction created for C:\Sandbox\xsmolasses\a_lousy_example\snapshot-2 <<===>> A:\Sandman\gimp-2.10.36-setup

%Sandbox_FileRootPath%\Snapshots.ini

[Snapshot_1]
Name=Python

[Snapshot_2]
Name=GIMP
Parent=1

[Current]
Snapshot=2
Default=