Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dockerfile #255

Merged
merged 3 commits into from
Apr 3, 2016
Merged

Create Dockerfile #255

merged 3 commits into from
Apr 3, 2016

Conversation

faddat
Copy link

@faddat faddat commented Apr 2, 2016

It's a file that will allow lib to run outside of its happy native debian environment, for example, on arch, or in fact... anywhere. That should actually do it, that single line. I can make it more complicated if need be, but I think that will work..... wait wait wait, have to do something about the path relativity, so..... I had it clone the repository anyway instead of just using the files that Docker will automatically copy over. May want to put this in igorpekovnik/docker to maximum cleanliness, but the idea here is that the docker image will be updated each time your repo is. It should be usable like this:

docker run -P igorpekovnik/lib ./compile.sh

It's a file that will allow lib to run outside of its happy native debian environment, for example, on arch, or in fact... anywhere.  That should actually do it, that single line.  I can make it more complicated if need be, but I think that will work..... wait wait wait, have to do something about the path relativity, so..... I had it clone the repository anyway instead of just using the files that Docker will automatically copy over.  May want to put this in igorpekovnik/docker to maximum cleanliness, but the idea here is that the docker image will be updated each time your repo is.  It should be usable like this:  docker run igorpekovnik/lib ./compile.sh
@faddat
Copy link
Author

faddat commented Apr 2, 2016

BTW: Untested, and made the pull request because I've done this many times before. I am doing some testing now that includes the build automation, and will let you know the results.

@zador-blood-stained
Copy link
Member

Image creation needs access to loop devices, so it will require running docker in privileged mode (if I understand its documentation correctly)

@faddat
Copy link
Author

faddat commented Apr 3, 2016

Thank you! I'll get that added. I may try using something like wercker to deal with the image build automation so that it isn't as ugly as it is at the moment.

Jacob Gadikian added 2 commits April 3, 2016 13:27
Build:
docker build --name lib .

Invocation:
docker run lib --privileged -it -P
@faddat
Copy link
Author

faddat commented Apr 3, 2016

Dockerfile now works, going to do a vagrantfile, too, because why not?

@igorpecovnik
Copy link
Member

Well, let's try.

@igorpecovnik igorpecovnik merged commit 9381c4b into armbian:master Apr 3, 2016
@faddat
Copy link
Author

faddat commented Apr 3, 2016

The next step in using this is for you or another (if there are any) of the repository's owners to go to hub.docker.com and then login, click "create automated build" in the upper-right hand corner, and then select the repository. This will make it so that a new docker image will be created each time the code for lib is updated :).

@faddat
Copy link
Author

faddat commented Apr 3, 2016

Can also look into using something like wercker to create a more complex build chain. Here's how to use it before making the automated build:

sudo docker build -t lib .
sudo docker run -it -P --privileged lib /root/compile.sh

If you want to use this Docker image on ARM (not supported @ docker hub for automated builds) just change the first line:

FROM ubuntu

to

FROM armv7/armhf-ubuntu

Once this image is added as an automated build, you'll be able to run it like this:

sudo docker run -it -P --privileged igorpecovnik/lib /root/compile.sh

Note: I haven't come up with an awesome way to pull the output out of the docker image. I may add some volumes so that it's easier. For now you can use docker copy, etc....

@faddat
Copy link
Author

faddat commented Apr 3, 2016

Note: Looking for feedback on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants