Comments (2)
To add anything to the docker image Modify the DockerFile (docker-python-sandbox/container/DockerFile).
You can add any installation commands you require. (for example below I have added python3 to the container)
FROM node:argon
RUN ["adduser", "--home", "/usr/src/app", "--system", "sandboxuser"]
RUN ["chown", "-R", "sandboxuser", "/usr/src/app"]
RUN ["chmod", "-R", "u+rwx", "/usr/src/app"]
COPY ./shared /usr/src/app
RUN cd /usr/src/app && npm install
COPY start.sh /
RUN chmod 755 /start.sh
RUN apt-get update
# Install python3
RUN apt-get install python3 -y
CMD ["/start.sh"]
You can also add files and folders in the docker file which can be then utalised after the containers instantiation from the start.sh file, this for example, is how the node server is started.
Then run the ./build.sh command from the "docker-python-sandbox/container/" directory. This will rebuild the "christophetd/docker_sandbox" image. However, if you wish to maintain the functionality of the previous image you can specify a new image name in the build.sh file as seen below:
#!/bin/bash
# Enter your image name below.
IMAGE_NAME="<YOUR IMAGE NAME HERE>"
if [ $# = 1 ]; then
IMAGE_NAME="$1"
fi
echo "Building image '$IMAGE_NAME'..."
docker build -t $IMAGE_NAME .
FYI:
I will be implementing another argument for the /compile endpoint to allow for multiple language support in the next 10 days or so.
from docker-python-sandbox.
Thank you @AlexanderCollins! I will add this to the readme.
from docker-python-sandbox.
Related Issues (15)
- Allow to specify the temporary directory
- Support choosing between python 2 and python 3 HOT 2
- PyPy or CPython? HOT 2
- Example in README doesn't work. HOT 17
- Integrate with docker-compose HOT 9
- 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.