#docker

/

      • rjhunter joined the channel
      • smw joined the channel
      • klj613- has quit
      • rjhunter has quit
      • brianrue joined the channel
      • rjhunter joined the channel
      • rogaha has quit
      • smooth-texan joined the channel
      • cro is now known as zz_cro
      • plietar has left the channel
      • nj3ma has quit
      • docker_bot joined the channel
      • docker_bot has quit
      • rjhunter has quit
      • qwerty_nor has quit
      • smooth-texan
        Hey all. I'm trying to set up a DJango dev environment with Docker. I'm doing a bind mount and all the files created from the container are owned by root when I go to look at them on the host. What's the best way around this?
      • Guest34577 has quit
      • cpuguy83 has quit
      • brianrue has quit
      • cpuguy83 joined the channel
      • brianrue joined the channel
      • ddsss joined the channel
      • ddsss has quit
      • ddsss joined the channel
      • rjhunter joined the channel
      • nj3ma_Zzz joined the channel
      • nj3ma_Zzz is now known as nj3ma
      • siong1987 joined the channel
      • cpuguy83 has quit
      • brianrue has quit
      • rjhunter has quit
      • frenchto1st has quit
      • ldlework
        smooth-texan: It probably has to do with the fact that the docker daemon runs as root
      • tianon
        one method is to use the -u option to docker run, another is to just do a chown on the files manually or as part of some other automation
      • zz_crosbymichael is now known as crosbymichael
      • j3pl joined the channel
      • smooth-texan
        tianon: derp, I'll try -u. Thanks tianon.
      • faawlex has quit
      • tianon
        :)
      • mikedawson has quit
      • klj613 joined the channel
      • klj613
        whats best way to check if container name XYZ already exists? i guess a grep on docker ps?
      • Guest89338 joined the channel
      • crosbymichael
        klj613: docker ps -a | grep XYZ
      • rjhunter joined the channel
      • rjhunter has quit
      • rjhunter joined the channel
      • klj613
        thanks
      • sebhoss has quit
      • shadylog joined the channel
      • shadylog
        Does docker host images? I have a fairly large one (200mb). How does it store the image? or does it only store the dockerfile?
      • rjhunter has quit
      • insertcoffee has quit
      • rjhunter joined the channel
      • crosbymichael
        stores everything
      • Guest89338 has quit
      • smooth-texan
        tianon: That worked like a charm. Thanks again.
      • tianon
        smooth-texan: yep :)
      • insertcoffee joined the channel
      • rjhunter has quit
      • vrm has quit
      • shadylog
        crosbymichael: oh wow, I was just reading your best practises on Dockerfiles ;)
      • zz_johncosta is now known as johncosta
      • johncosta is now known as zz_johncosta
      • zz_mboersma is now known as mboersma
      • merlin83 joined the channel
      • merlin83 has quit
      • merlin83 joined the channel
      • rjhunter joined the channel
      • Phaygo joined the channel
      • crosbymichael is now known as zz_crosbymichael
      • rjhunter has quit
      • zz_crosbymichael is now known as crosbymichael
      • Phaygo has quit
      • zz_taion809 is now known as taion809
      • themurph joined the channel
      • rhunter joined the channel
      • j3pl has quit
      • ddsss has quit
      • merlin83 has quit
      • shiranaihito has quit
      • rhunter has quit
      • crosbymichael: I was in this channel yesterday and I was wondering about what the effect is of a lot of RUN commands in a Dockerfile. And my 'conservative' mind says I should bind related commands into one RUN command instead of invididual ones
      • More images are created when you use more RUN commands right? So &&'ing them together would save some space maybe?
      • crosbymichael
        yes, I do that
      • you can see a lot of dockerfiles that I wrote here https://github.com/crosbymichael/Dockerfiles
      • shadylog
        For example I have the following for mysql:
      • RUN (apt-get install software-properties-common -y && apt-add-repository ppa:webupd8team/java -y && apt-get update && echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections && apt-get install oracle-java7-installer -y)
      • *argh for java
      • crosbymichael
        i have a java dockerfile in that repo ;)
      • frive joined the channel
      • you can also use line continuations like in this dockerfile https://github.com/crosbymichael/.dotfiles/blob...
      • shadylog
        Ahh :) Okay so why not use concatenation there?
      • merlin83 joined the channel
      • merlin83 has quit
      • merlin83 joined the channel
      • also isn't it bad to do this: RUN apt-get upgrade -y
      • brianrue joined the channel
      • crosbymichael
        no
      • it's fine
      • i guess its not needed at the top tough
      • shadylog
        If you are upgrading to latest version, things might break as opposed to running FROM ubuntu:12.10 ?
      • and if the cache is used in the future then..
      • maybe I don't understand it yet :)
      • crosbymichael
        upgrade upgrades pkgs not the distro
      • shadylog
        but say I make a dockerfile and an image to run mysql. then a month later I use the same heading to install java. It will pick up from cache the old 1 month old java right?
      • for a different image
      • crosbymichael
        ???
      • shadylog
        OK say I build an image called shadylog/java: FROM java (the first 6 lines of your stash Dockerfile)
      • then I make my image, i am happy
      • crosbymichael
        ok
      • vfumo has quit
      • shadylog
        then I decide a month later to install zookeeper or whatever, (also needing java) So I start the Dockerfile with FROM shadylog/java
      • zz_cro is now known as cro
      • but what I don't realize is that the original Dockerfile might have an older version of java installed than what I am doing now
      • than what is being installed now
      • what are the implications of upgrading packages from BASe or whatever in a Dockerfile? I.e. support etc? I have no idea what version of java I will be holding, as it depends on when the image was built
      • faawlex joined the channel
      • plietar joined the channel
      • mboersma is now known as zz_mboersma
      • themurph has quit
      • crosbymichael
        well then don't run apt-get upgrade when inheriting from your base images if you don't want to upgrade pre-installed dependencies ;)
      • merlin83 has quit
      • mithsv has quit
      • frenchto1st joined the channel
      • cro is now known as zz_cro
      • shadylog
        yeah of course :) but like you said, having apt-get upgrade early on in your Dockerfile may confuse the cache. So a good practise would be to always push it to the last RUN ?
      • that way your cache is never wrong
      • plietar
        Is it possible to make stopped containers keep their IP address when they stop/restart ?
      • crosbymichael
        shadylog: no
      • plietar: no, not right now
      • plietar
        ok, thanks
      • frenchto1st has quit
      • Speed has quit
      • josh-k joined the channel
      • josh-k_ joined the channel
      • josh-k has quit
      • merlin83 joined the channel
      • merlin83 has quit
      • merlin83 joined the channel
      • pickels has quit
      • josh-k joined the channel
      • cookednoodles has quit
      • faawlex has quit
      • rdw200169 joined the channel
      • crosbymichael is now known as zz_crosbymichael
      • brianrue has quit
      • josh-k_ has quit
      • brianrue joined the channel