4 ms·
Hey, docker newb here. Can I easily put my own software in it? I've got this c++ program that has a few dependencies in ubuntu.
by sown 13y ago
Hey,
docker newb here. Can I easily put my own software in it? I've got this c++ program that has a few dependencies in ubuntu.
- shykes 13y agoThe easiest way is to add a Dockerfile to your source repository, and use 'docker build' to create a container image from it. Documentation link: http://docs.docker.io/en/master/use/builder/ http://docs.docker.io/en/master/use/builder/
- sown 13y agoHmm. this is good. but my build environment is kind of wonky. Can I just hand it a .tar.gz and say, put it in /usr/asdf and let it run? What about python scripts? Maybe I just give it a location to an RPM? like in this document? http://docs.docker.io/en/master/examples/python_web_app/ http://docs.docker.io/en/master/examples/python_web_app/
- shykes 13y agoYou can use the ADD build instruction in the Dockerfile to upload any part of your source repo into the container. Then more RUN instructions to manipulate that, for example compile the code etc. Here are 2 examples: https://github.com/steeve/docker-opencv https://github.com/steeve/docker-opencv https://github.com/shykes/docker-znc https://github.com/shykes/docker-znc
- PetrolMan 13y agoI couldn't reply to your deeper comment so I'm going to do it here. You can use the Dockerfile to copy files from you local system onto the image and then run various commands on the image. You have access to a full linux environment inside the docker image so you can do anything on the image that you can do in your normal development environment.
- sown 13y ago> I couldn't reply to your deeper comment so I'm going to do it here. You can use the Dockerfile to copy files from you local system onto the image and then run various commands on the image. I wonder if this would be good for (large) embedded systems. Thanks for the tip.