AlexNathan345 Posted July 3, 2015 Share Posted July 3, 2015 I would like to create a Docker for this project: https://github.com/thoukydides/heatmiser-wifi - at the moment I have it running in a VM based on Ubuntu Server 14 which seems like a huge overkill for something simple as this. However, I never built a Docker before but am eager to learn. From what I understand I need a base image, then get the required stuff from the above link working (Git, Pearl, Pearl Packages, Upstart) inside the image, then use other Dockers for the database (MariaDB) and web server (Apache) and finally make all of them work together nicely. Is there a guide on how best to do this to make it work on unRAID? Or a general easy to follow guide on how to build a Docker like this from scratch? Any help would be very much appreciated, thanks a lot. Quote Link to comment
sparklyballs Posted July 3, 2015 Share Posted July 3, 2015 personally, i'd put the apache element and the app itself in one container, use a mariadb or mysql container for the database element, and don't use upstart in a container.. Quote Link to comment
AlexNathan345 Posted July 6, 2015 Author Share Posted July 6, 2015 Thanks very much, that's a good idea. Any other tips on how to start, like which base image to use? Does it have to be Ubuntu-based, or would any of the other (smaller) ones would work better? Is there a guide specifically for unRAID or can I gust follow any guide on building a Docker image? Quote Link to comment
lonix Posted July 6, 2015 Share Posted July 6, 2015 personally, i'd put the apache element and the app itself in one container, use a mariadb or mysql container for the database element, and don't use upstart in a container.. This. Also for baseimage look at phusion\baseimage. Quote Link to comment
ironicbadger Posted July 6, 2015 Share Posted July 6, 2015 Thanks very much, that's a good idea. Any other tips on how to start, like which base image to use? Does it have to be Ubuntu-based, or would any of the other (smaller) ones would work better? Is there a guide specifically for unRAID or can I gust follow any guide on building a Docker image? There are some 'best practices' appearing on these forums for unRAID Dockers but I can't for the life of me figure why they'd want to depart from the standard Docker thinking. As I keep saying, Docker is just a packaging mechanism and is completely platform agnostic (or should be if done right). Basically what I'm saying is, any Docker guide will do. Docker is Docker, even on unRAID. Quote Link to comment
sparklyballs Posted July 6, 2015 Share Posted July 6, 2015 Docker is Docker, even on unRAID. That is essentially true, but there are certains things that if implemented can make a docker more suitable for unraid, uid and gid being the main one, using the TZ variable (passed with the bind time feature from the template) in containers where timezones are important is another, although the TZ variable can be passed manually from the comnand line of course on non-unraid boxes. Quote Link to comment
ironicbadger Posted July 6, 2015 Share Posted July 6, 2015 Docker is Docker, even on unRAID. That is essentially true, but there are certains things that if implemented can make a docker more suitable for unraid, uid and gid being the main one, using the TZ variable (passed with the bind time feature from the template) in containers where timezones are important is another, although the TZ variable can be passed manually from the comnand line of course on non-unraid boxes. If you're building a container you're on the command line anyway... Quote Link to comment
sparklyballs Posted July 6, 2015 Share Posted July 6, 2015 Docker is Docker, even on unRAID. That is essentially true, but there are certains things that if implemented can make a docker more suitable for unraid, uid and gid being the main one, using the TZ variable (passed with the bind time feature from the template) in containers where timezones are important is another, although the TZ variable can be passed manually from the comnand line of course on non-unraid boxes. If you're building a container you're on the command line anyway... if you're the only person using it....... Quote Link to comment
AlexNathan345 Posted July 6, 2015 Author Share Posted July 6, 2015 personally, i'd put the apache element and the app itself in one container, use a mariadb or mysql container for the database element, and don't use upstart in a container.. If I can't use UPSTART in a container, what should I do to run a daemon instead? Quote Link to comment
AlexNathan345 Posted July 6, 2015 Author Share Posted July 6, 2015 And how do I get my own Docker container loaded into my unRAID system? Quote Link to comment
sparklyballs Posted July 6, 2015 Share Posted July 6, 2015 personally, i'd put the apache element and the app itself in one container, use a mariadb or mysql container for the database element, and don't use upstart in a container.. If I can't use UPSTART in a container, what should I do to run a daemon instead? runit (if you're going with phusion baseimage or supervisor if you're not, or if the app and runit don't get on together) sometimes to get the command to use in either (and this doesn't always work) i edit the upstart or init file and change the exec in the exec line to echo and run it from a command line inside the container. Quote Link to comment
sparklyballs Posted July 6, 2015 Share Posted July 6, 2015 And how do I get my own Docker container loaded into my unRAID system? depends if you want to share it or just use it yourself (selfish, lol) make a git repository for the dockerfile and ancillary files like startup routines and config files etc..... then use dockerhub automated build linked to that repo. then make a template repo and an xml file for it container repo example https://github.com/sparklyballs/docker-containers template repo example https://github.com/sparklyballs/docker-repo/tree/templates/Sparklys-Repo announce the repo in the main docker thread and squid will pick it up and put it in the community applications plugin and his thread on repos. BUT if you're going to be selfish, lol.... just do the build on your unraid box and you'll get a docker image appear in your docker tab, providing you've setup a docker.img file Quote Link to comment
Squid Posted July 6, 2015 Share Posted July 6, 2015 To continue with Sparkly's comments -> if you don't want to share it, you can still make the github repo and the template and add the repository as a private one (and have CA still manage it) -> see the OP in the CA thread Quote Link to comment
NeoMatrixJR Posted March 6, 2018 Share Posted March 6, 2018 On 7/6/2015 at 2:39 PM, sparklyballs said: just do the build on your unraid box and you'll get a docker image appear in your docker tab, providing you've setup a docker.img file So...for the docker inept (outside of using CA to get and install dockers) can you explain how to do the build on unraid? Do I need to navigate to a specific folder? Any specific commands to get the image where it's supposed to be? Can you explain more about "providing you've setup a docker.img file"? Is that the one that exists on the system if I'm using dockers or will that be a docker image for the docker file I'm building? Quote Link to comment
trurl Posted March 6, 2018 Share Posted March 6, 2018 20 minutes ago, NeoMatrixJR said: So...for the docker inept (outside of using CA to get and install dockers) can you explain how to do the build on unraid? Do I need to navigate to a specific folder? Any specific commands to get the image where it's supposed to be? Can you explain more about "providing you've setup a docker.img file"? Is that the one that exists on the system if I'm using dockers or will that be a docker image for the docker file I'm building? Been a while since I played with any of this, but everything docker related the unRAID webUI and its plugins do is just commands to the builtin docker engine. That docker engine has everything you need to build dockers. It is documented extensively at the docker website. https://www.docker.com/ Go to the command line and start playing around. Quote Link to comment
uek2wooF Posted April 2, 2020 Share Posted April 2, 2020 Since this is the first thread that comes up on google and isn't very detailed, I just wanted to link the guide I just wrote. It shows you how to create a docker container, add it to your own private docker registry (or you can use dockerhub), and then add it to the private apps section of Community Applications. 5 2 Quote Link to comment
N0ri Posted March 22, 2021 Share Posted March 22, 2021 On 7/6/2015 at 8:39 PM, sparklyballs said: just do the build on your unraid box and you'll get a docker image appear in your docker tab, providing you've setup a docker.img file this comment is pur gold.. thank you.. this works for me.. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.