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

Conversation

Projects
None yet
3 participants
@faddat
Contributor

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
Jacob Gadikian
Create Dockerfile
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

This comment has been minimized.

Show comment
Hide comment
@faddat

faddat Apr 2, 2016

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@zador-blood-stained

zador-blood-stained Apr 2, 2016

Member

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

Member

zador-blood-stained commented Apr 2, 2016

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

@faddat

This comment has been minimized.

Show comment
Hide comment
@faddat

faddat Apr 3, 2016

Contributor

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.

Contributor

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 some commits Apr 3, 2016

faddat
Made the dockerfile actually work.
Build:
docker build --name lib .

Invocation:
docker run lib --privileged -it -P
@faddat

This comment has been minimized.

Show comment
Hide comment
@faddat

faddat Apr 3, 2016

Contributor

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

Contributor

faddat commented Apr 3, 2016

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

@igorpecovnik

This comment has been minimized.

Show comment
Hide comment
@igorpecovnik

igorpecovnik Apr 3, 2016

Member

Well, let's try.

Member

igorpecovnik commented Apr 3, 2016

Well, let's try.

@igorpecovnik igorpecovnik merged commit 9381c4b into armbian:master Apr 3, 2016

@faddat

This comment has been minimized.

Show comment
Hide comment
@faddat

faddat Apr 3, 2016

Contributor

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 :).

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@faddat

faddat Apr 3, 2016

Contributor

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....

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@faddat

faddat Apr 3, 2016

Contributor

Note: Looking for feedback on this!

Contributor

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