Comments (9)
Exposing socket (docker run -v /var/run/docker.sock:/var/run/docker.sock ...
) has actually helped. Everything is working.
As I understand, you don't have plans to support other languages besides python? Would be awesome if the app supported more languages.
from docker-python-sandbox.
Just didn't take the time to complete it. I'll add it to my to do list, and probably add Java, Bash, PHP and C / C++.
from docker-python-sandbox.
Hey, sorry about the delay. I didn't get a notification for your issue.
You can't ยซ add this sandbox ยป as a third service, as the sandbox is both a Docker image and some Node code that boots and handles the lifecycles of sandbox instances.
Also, note that you probably can't use the library if your application runs inside Docker (since the library needs to start up containers itself).
from docker-python-sandbox.
Does it possible to implement this using 2 services?
First service - the sandbox itself, where we'd run the code.
Second service - image with node app that would boot the sandbox (first service). Second service would depend on first service.
from docker-python-sandbox.
I think it might be possible with the following setup:
- Your application runs inside a container
- The Docker socket of the host is mounted inside the container (e.g.
docker run -v /var/run/docker.sock:/var/run/docker.sock [...]
) - The Docker CLI is installed inside the container (e.g.
apt-get update && apt-get install -y docker.io
Example:
user@docker-host:~ $ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock ubuntu
root@e45b3e6c527b:/# apt-get update && apt-get install -y docker.io
[...]
root@e45b3e6c527b:/# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e45b3e6c527b ubuntu "/bin/bash" 7 minutes ago Up 7 minutes compassionate_meninsky
After doing that, you'll be able to run Docker commands (e.g. start a container with docker run
) from within the container. So I assume the library should theoretically work in this setup. Let me know if that works out!
from docker-python-sandbox.
Thanks for your help! Actually, I have already tried this but with another library that is similar to yours. Haven't succeeded. I have created an issue there. remoteinterview/compilebox#51
I think, I gonna try to do what you have suggested using this library. I will let you know.
from docker-python-sandbox.
Sounds good!
from docker-python-sandbox.
A while ago I started a branch supporting PHP, Python and Java, but I never finished it. What language(s) would be of interest to you?
from docker-python-sandbox.
The reason why I need to use this library is because I'm building a web app where you can solve programming challenges. The examples of similar sites are codewars or udacity. For me there is no priority, actually. The more, the better.
Why did you drop it? No free time? I'm just thinking that it is useful to have more languages. Not only one python.
from docker-python-sandbox.
Related Issues (15)
- Allow to specify the temporary directory
- Support choosing between python 2 and python 3 HOT 2
- Add a section to the FAQ explaining how to add stuff to the docker image HOT 2
- PyPy or CPython? HOT 2
- Example in README doesn't work. HOT 17
- Support for input HOT 3
- Handle brutal shutdowns
- Regarding Pull Request
- Document how to build the Docker image
- Implement timeout HOT 1
- SELinux / AppArmor
- Write credits HOT 1
- Documentation about what modules are installed
- Make the container image name changeable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-python-sandbox.