Dockerization of some popular applications.


Recommended Posts

Needo

 

if i understand well then you are using a debian image to start with ?

not the ubuntu one from Lime Tech ?

i understand how you guys hook into that base image

but where the heck is it coming from

 

been looking at the dokerfiles code from schutlz and you and all i can see are the different from lines...

this means the base image is coming from docker?

 

where can i choose a base image?

any base images coming with php, mysql and apache?

or are we supposed to install that one at a time ?

 

aka base image -> dock for mysql -> dock for php -> dock for Apache

 

example i need a mysql database for XBMC and one for newznab

they can run both on the same one  don't care much about that but how do i hook newznab with is HTTP (apache) in the same mysql docker?

or do i need to run a mysql docker and a mysql+php+apache docker in one docker to run newznab ?

 

 

Link to comment

if i understand well then you are using a debian image to start with ?

not the ubuntu one from Lime Tech ?

i understand how you guys hook into that base image

but where the heck is it coming from

been looking at the dokerfiles code from schutlz and you and all i can see are the different from lines...

this means the base image is coming from docker?

 

LimeTech does not provide a base image. It all comes from the Docker Hub. The only differences between my dockerfile and Schutlz' is I am using a Debian base while he is using an Ubuntu one. The Debian one is more lightweight then the Ubuntu one. In addition I do not do an apt-get upgrade. My version is using the plexpass version while his is using the public release, and mine runs as the user plex while his runs as root.

 

He did an amazing job and I based my work on his. But I wanted some things done slightly differently. Hooray Open Source!

 

where can i choose a base image?

any base images coming with php, mysql and apache?

or are we supposed to install that one at a time ?

aka base image -> dock for mysql -> dock for php -> dock for Apache

example i need a mysql database for XBMC and one for newznab

they can run both on the same one  don't care much about that but how do i hook newznab with is HTTP (apache) in the same mysql docker?

or do i need to run a mysql docker and a mysql+php+apache docker in one docker to run newznab ?

 

Check out https://hub.docker.com/ there are many base OS images to choose from including Ubuntu, Debian, CentOS, ArchLinux, etc. Do a search for existing packages for the LAMP stack (all in one). There is also some xbmc. You do not have to code it yourself you can use other's work.

 

I chose to roll my own because I wanted to learn how to, and I am a minimalist. I could have used any of the many existing versions. Except for PlexWatch. There was not a docker for that.

Link to comment

An app like MySQL, that other apps will use, would that be better in a container or plugin ?  It's the sort of app that needs to be started early on in the boot sequence.

 

I would use it in a Dock myself but that's just because I am docker crazy. :) You can also link containers so for example if you want to run one mysql dock that would feed apache, xbmc, etc. you can link them as documented here:

 

https://docs.docker.com/userguide/dockerlinks/

Link to comment

was looking for a crashplan dock and a plexconnect one but came up empty :(

i know about lamp...

but lets say i want to stay with ubuntu ... just because it is a popular distro and has a lot of packages

if i go look on the hub for lamp then i will have to open the dockerfile to see what base it uses ?

 

i searched using the search on top for mysql and i get a lot of different docks ...  is there a way to weed out all the non ubuntu 14.04 ones?

 

Link to comment

Would you care to share the 'steps' for creating one of your containers?  I want to build one for SickRage, but still am not too sure how to get started.

 

Thanks!

 

Justin

 

should be easy

this is the LT dock for sickbeard

 

FROM ubuntu:14.04
MAINTAINER Eric Schultz <[email protected]>

ENV DEBIAN_FRONTEND noninteractive

RUN locale-gen en_US en_US.UTF-8

RUN apt-get update -q
RUN apt-get install -qy --force-yes python python-cheetah ca-certificates git

RUN git clone https://github.com/midgetspy/Sick-Beard/ /sickbeard/

VOLUME /config
VOLUME /data

EXPOSE 8081

ENTRYPOINT ["python", "/sickbeard/SickBeard.py"]
CMD ["--datadir=/config"]

gues all you need to change is the github url and you would need to change the directory

 

SO it would come down to this

FROM ubuntu:14.04

MAINTAINER Eric Schultz <[email protected]>

 

ENV DEBIAN_FRONTEND noninteractive

 

RUN locale-gen en_US en_US.UTF-8

 

RUN apt-get update -q

RUN apt-get install -qy --force-yes python python-cheetah ca-certificates git

 

RUN git clone https://github.com/echel0n/SickRage/ /sickrage/

 

VOLUME /config

VOLUME /data

 

EXPOSE 8081

 

ENTRYPOINT ["python", "/sickrage/SickBeard.py"]

CMD ["--datadir=/config"]

 

the sickbeard.py stays same for now as the programmers from sickrage didn't change this yet

you might want to change the port if you run both of them :P

 

Link to comment

A few quick thoughts about this. :)

 

All the base OS in the opening post are Debian:Jessie. I like this and IMO we should only change here if we consciously need to (i.e. FROM ubuntu:14.04) < likely just copy and paste but worth pointing out.

 

Git is usually not available by default. If it is in ubuntu:14.04 that confirms why people think it is bloaty.

 

I would consider that it "might" better to git clone from a specific tag/point so that users of this docker get the same version until the docker maintainer says otherwise  or grab a tar of that same point and just use that which removes the git dependency completely. IMHO this is one thing docker people often do wrong, the whole point of docker is that we all have exact same setup and using git this way breaks that design tenant.

 

Nice work all. I have stickied this post as its quality work.

Link to comment

Also, if you have some time, if you wouldn't mind writing a quick, high-level step by step for building a container, I'd like to build one for SickRage (although I like nzbdrone I may just stick with it now), and also one for MakeMKV, so I can run it from my laptop, but actually run it on the server.

Have you read the User Guide on the docker site?  It seems to cover the basic process quite well.

 

I have used the User Guide to enable me to try the process of building a docker container on my Windows system (where I have installed the Windows docker client); testing that it ran as expected in the Windows docker environment; and then when happy with that starting up the same container on unRAID.  It all seemed to work painlessly.

Link to comment

Needo,

 

Just wanted to thank you for all your hard work here.  This is really amazing how quick you and the others here have adopted "Dockerization".  Thank you again and thanks to all who are participating here to help test out one of the biggest new features of unRAID!

Link to comment

A few quick thoughts about this. :)

 

All the base OS in the opening post are Debian:Jessie. I like this and IMO we should only change here if we consciously need to (i.e. FROM ubuntu:14.04) < likely just copy and paste but worth pointing out.

 

Git is usually not available by default. If it is in ubuntu:14.04 that confirms why people think it is bloaty.

 

I am not sure about git specifically. I decided to go with Debian over Ubuntu due to this article I read on Docker Best Practices: http://crosbymichael.com/dockerfile-best-practices-take-2.html

 

I would consider that it "might" better to git clone from a specific tag/point so that users of this docker get the same version until the docker maintainer says otherwise  or grab a tar of that same point and just use that which removes the git dependency completely. IMHO this is one thing docker people often do wrong, the whole point of docker is that we all have exact same setup and using git this way breaks that design tenant.

Nice work all. I have stickied this post as its quality work.

 

That is an excellent point and one I agree with and will address.

 

Thank you for the sticky!

Link to comment

I couldn't see which version of nzbget you were using. I'm assuming 12? Can you build 13? (nzbget-testing)

 

Yes this is v12. I haven't played with v13 year. v12 was easy hanging fruit as it was already in the Debian repositories. I will take a look into this and see what I can do.

Link to comment

Needo,

 

Just wanted to thank you for all your hard work here.  This is really amazing how quick you and the others here have adopted "Dockerization".  Thank you again and thanks to all who are participating here to help test out one of the biggest new features of unRAID!

 

Thank you very much! I am really enjoying Docker and look forward to making more. If any one has any requests I would happily take a look. I believe I already saw one for sickrage.

Link to comment

Needo,

 

Just wanted to thank you for all your hard work here.  This is really amazing how quick you and the others here have adopted "Dockerization".  Thank you again and thanks to all who are participating here to help test out one of the biggest new features of unRAID!

 

Thank you very much! I am really enjoying Docker and look forward to making more. If any one has any requests I would happily take a look. I believe I already saw one for sickrage.

Transmission

LogitechMediaServer

 

Since you already have plexpass and nzbget, these are the only things I am missing.

 

Thanks

Link to comment

I would consider that it "might" better to git clone from a specific tag/point so that users of this docker get the same version until the docker maintainer says otherwise  or grab a tar of that same point and just use that which removes the git dependency completely. IMHO this is one thing docker people often do wrong, the whole point of docker is that we all have exact same setup and using git this way breaks that design tenant.

 

Quick question. From what i can tell git only gets executed when a docker build is executed. So for example when I trigger a build on the Docker Hub. A git is not executed at every install. But I cannot find any sure documentation on this. Am I correct?

Link to comment
I'm looking at the couchpotato one now.  I think I follow pretty much everything, but what is the debianism you refer to?  Not being a Linux person, I can assume it's an oddity of debian, but I know nothing about that you're trying to 'fix' nor what those commands are.  Just curious.

 

Debian has a different UID and GID set for their nobody user then Slackware/unRAID does. This makes it so if I did not change the nobody user's uid and gid then it shows up wonky in the unRAID process list as well as the files created on unRAID would have a funky ownership. And then I would end up spending a lot of time supporting wacky permissions.

Link to comment

I couldn't see which version of nzbget you were using. I'm assuming 12? Can you build 13? (nzbget-testing)

 

Yes this is v12. I haven't played with v13 year. v12 was easy hanging fruit as it was already in the Debian repositories. I will take a look into this and see what I can do.

Thanks. The way the developer works, the "testing" version can be in testing for months (years?) and is stable with few bugs, so most of us run that. 12.0 is 6 months old and is way out of date.

The testing version also gets updated regularly (which is a good thing). How do we update within a container? nzbget has its own internal update method, but it has to be set up properly. Maybe overbyrn could comment on that?

 

There is also the subversion thingy with (what will become) v14, but I don't think many people run that.

 

Cheers!

Link to comment

I am curious if we can find a way to be more generic with:

 

RUN ln -sf /usr/share/zoneinfo/CST6CDT /etc/localtime

 

If I understand what I am seeing this sets the timezone to UTC/GMT -5 hours which is pretty specific.

 

Yes, I'm looking into a way to make this able to be set from the docker run command. This is my timezone. And I was being a bit lazy as I wanted to get things back online as quickly as possible once my Xen VM bit the dust. :)

 

EDIT: I found a simple way to do this! Updates coming soon!

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.