#docker

/

      • rdw200169
        mkscrg: you can mount the folder with all the database variable data outside the countainer
      • rubino123 joined the channel
      • frk131
        mkscrg: not sure how such a workflow should look like. normal times i dont need to run isolated processes in vagrant. the vagrant vm itself is isolated.
      • rubino123
        are their any security benefits to docker?
      • with docker do I have one vm or environment that runs containtainers or does every container require a vm-like environment?
      • ultramurph joined the channel
      • mkscrg
        rdw200169: i've been trying that, but postgres needs its data directory and server process to be owned by the same non-root user. however chown doesn't work on bind mounted volumes inside a container
      • ultramurph has quit
      • rdw200169
        mkscrg: well, it can (at least I know how to do it thru lxc) it's just a pain
      • you just need the uid's to match b/w the container and host os
      • ultramurph joined the channel
      • (if memory serves)
      • mkscrg
        rdw200169: ah i see. alternatively, is there a way to prevent docker from destroying all data in a container when its main process exits?
      • frk131
        mkscrg: -d ?
      • taion809
        how does it work with webservers, just throw the webserver and any additional servers like php-fpm on the same image and mount a directory with all of the websites?
      • rdw200169
        mkscrg: it doesn't destroy all the data until you destroy the stopped container
      • mkscrg: you have to manually tell it to remove the container via docker rm <id>
      • jonasi has quit
      • stevedomin joined the channel
      • mkscrg: likewise, in the spirit of fhs, you should be able to get to everything via the host in /var/lib/docker
      • frk131
        is there something like "rm *", "kill *", ...?
      • jayd3e has quit
      • mkscrg
        interesting! i think i misunderstood something, checking my assumptions now...
      • rdw200169
        frk131: not that I know of
      • jayd3e joined the channel
      • dsissitka
        mkscrg: Containers aren't ephemeral. They don't get deleted when killed or stopped.
      • jayd3e has quit
      • Just restart the container and your data will be there.
      • rdw200169
        it would be nice, though, to have an ephemeral feature...
      • dsissitka
        That's in progress.
      • gh#1589
      • [o__o]
        479 - add -rm support to docker run: https://github.com/dotcloud/docker/issues/1589
      • ultramurph has quit
      • sandfox has quit
      • rdw200169
        dsissitka: hey yeah, sweet!
      • jayd3e joined the channel
      • all things considered, docker is starting to look a lot better than doing things thru the lxc commands (I've been using lxc for my personal projects for quite a while now)
      • mkscrg
        ok where i'm confused: if i can a container (daemonized or otherwise), and it exits (w/ exit code 0 or otherwise), it disappears from `docker ps`
      • for example: sudo docker run -d ubuntu /bin/sh -c "echo hello; sleep 5; grep --an-invalid-arg"
      • snovak joined the channel
      • goes away after 5s
      • dsissitka
        docker ps -a
      • mkscrg
        hah, of course. thank you dsissitka
      • dsissitka
        No problem.
      • mkscrg has quit
      • mramm joined the channel
      • snovak has quit
      • mihasya has quit
      • hayeah joined the channel
      • dsissitka is now known as dsissitka|away
      • stevedomin has quit
      • jayd3e has quit
      • jayd3e joined the channel
      • scottstamp joined the channel
      • jayd3e has quit
      • scottstamp has quit
      • hayeah has quit
      • hayeah joined the channel
      • frk131
        hwo to install mysql on docker? i cant really start the server because upstart doesnt work
      • jonasi joined the channel
      • zodman_ joined the channel
      • kennethreitz joined the channel
      • schnittchen joined the channel
      • gyre007
        frk131: have a look here...there is a paragraph about mysql http://robknight.org.uk/blog/2013/05/drupal-on-...
      • zodman has quit
      • jayd3e joined the channel
      • cookednoodles has quit
      • frk131
        gyre007: it doesnt help me because this is centos related
      • srid
        i'm running containers via supervisord, which invokes 'docker run' (without -d).
      • gyre007
        im pretty sure the whole flow shouldnt be TOO different
      • srid
        from supervisor API, i can retrieve the PID of running processes. how do I find the docker ID from this PID (of `docker run`)?
      • jayd3e has quit
      • frk131
        gyre007: but i want to share the image and dont want everyone to log in to the image and hack around this issue
      • think starting services should be a normal usecase
      • and "service mysql start" dosnt work :P
      • gyre007
        did you try init script ? init.d...
      • josephholsten joined the channel
      • srid: have a look here...shouldnt be hard http://pnasrat.github.io/2013/08/25/inside-dock...
      • frk131
        gyre007: same issue using the init script https://gist.github.com/anonymous/6401617
      • gyre007
        do you have a Dockerfile somewhere ?
      • so that I could reproduce this ?
      • frk131
        gyre007: no dockerfile, sry. just install "ubuntu" and "mysql-server"
      • gyre007
        ok sec...
      • i need to spin my vagrant
      • im on a sh** slow laptop
      • which version of Ubuntu ?
      • frk131
        just "ubuntu"
      • gyre007
        :)
      • frk131
        gyre007: sudo docker run -i -t ubuntu /bin/bash
      • gyre007
        uname -a ?
      • frk131
        gyre007: Linux 73759e040738 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
      • mirkoki joined the channel
      • gyre007
        ok that doesnt contain the versio...I presume it's the latest one if you pulled the base...
      • ok se
      • c
      • mirkoki has quit
      • mirkokiefer1 joined the channel
      • installing mysql...
      • man i hate mysql
      • mirkokiefer1 has quit
      • dave_slotnick joined the channel
      • cant belive youre using it
      • frk131
        hehe
      • zodman_ has quit
      • mirkokiefer1 joined the channel
      • dave_slotnick
        I'm in love with Docker, but I'm new to Go and haven't contribute to an open source project in years. Any pointers on the best place to start?
      • mirkokiefer1 has quit
      • mirkokiefer1 joined the channel
      • dsissitka|away is now known as dsissitka
      • dsissitka
        You need to use mysqld_safe to start MySQL.
      • gyre007
        yeah its a wrapper script....
      • im checking this out...sec
      • dsissitka
        What is?
      • gyre007
        mysqld_safe ?
      • zz_crosbymichael is now known as crosbymichael
      • dsissitka
        Kind of.
      • frk131
        mhmm, /usr/sbin/mysqld also works ....
      • dsissitka
      • gyre007
      • :)
      • yeah it does but it's not recommended
      • dsissitka
        "mysqld_safe is the recommended way to start a mysqld server on Unix..."
      • Ah, that was re mysqld.
      • frk131
        i never had such problems, mhmmm
      • dsissitka
        Some init scripts, like MySQL's, won't work.
      • I think MySQL's chokes because it depends on upstart.
      • crosbymichael
        dave_slotnick: a place to get started with Go?
      • frk131
        and why upstart doesnt work?
      • dsissitka
        Because it's not run by default?
      • Just your process is.
      • frk131
        and i cant start it?
      • borgenk joined the channel
      • dsissitka
        You can run /sbin/init if you'd like. It's a bit overkill though.
      • dave_slotnick
        Not Go in particular, I could easily pick that up in isolation, but that plus the fact that I don't understand the Docker project layout is confusing me. I'm sure I could bash at it for awhile and figure it all out, but I was hoping there's a document somewhere that would help me bootstrap.
      • frk131
        dsissitka: /sbin/init 1 init: Failed to connect to socket /com/ubuntu/upstart: Connection refused
      • dsissitka
        Docker's source is pretty easy to navigate.
      • mirkokiefer1 has quit
      • frk131: Not that way. "docker run ... /sbin/init".
      • crosbymichael
        dave_slotnick: what is confusing you about the layout?
      • tech joined the channel
      • dave_slotnick
        For example, just running the tests
      • that's where I always start
      • crosbymichael
        go test
      • ;)
      • tech is now known as Guest65919
      • dsissitka
        commands.go is where you'd start looking for the CLI. api.go for the API.
      • dave_slotnick
        lol
      • let me try that
      • gyre007
        im almost with example frk131 sec
      • frk131
        dsissitka: yeah, but than i doesnt have a shell