#docker

/

      • doniphon joined the channel
      • danzilio has quit
      • thomasjachmann joined the channel
      • nemothekid joined the channel
      • derBobby has quit
      • maximedev joined the channel
      • MattJ has quit
      • ctp has quit
      • chance
        i think its pretty noticible, like half as fast or worse
      • someword has quit
      • mxbtty joined the channel
      • tcurdt joined the channel
      • ocdmw joined the channel
      • MattJ joined the channel
      • tcurdt
        I am a little confused. I have "ENTRYPOINT [ '/app/server' ]" and the container exits. Now I am trying to track down the exit. On 'ps -a' I see "/bin/sh -c '[ '/app .... but why "/bin/sh -c" ? After all I am using ENTRYPOINT not CMD
      • chance
        i think you need double quotes
      • codey joined the channel
      • codey
        I'm having issues with the postgres container and the initdb directory. This is what I'm trying to do: https://github.com/coxley/docker-nipap-psql
      • ocdmw has quit
      • gomex has quit
      • if i remove copying the .sh to the initdb directory from my build, it doesn't get that error but of course i need that file to run some sql commands
      • any ideas?
      • berto- has quit
      • yamadapc has quit
      • Spr0cket joined the channel
      • donspaulding joined the channel
      • gwz
        codey: you can only run -single commands in your .sh I believe
      • I have found a solution where I create another container after postgres which links to the postgres container and initializes the postgres db there
      • roamingdog joined the channel
      • juanpablo_ joined the channel
      • codey
        that's odd to only run one command per .sh, but I'll give it a whirl.
      • If not, I'll learn how to use compose I guess and do the latter. :)
      • tcurdt
        chance: doesn't make a difference. double quotes or single - same behaviour.
      • juanpablo_ has quit
      • gwz
        its not one command, you can have many commands as long as they use postgres --single I believe
      • juanpablo_ joined the channel
      • but I believe your .sh are probably trying to connect to the db and then do the initialization
      • but the db doesn't start when the .sh scripts are called
      • MartinCleaver has quit
      • well it starts but doesn't listen to the incoming connections at that point
      • codey
        gotcha, that makes sense
      • so is there a way i could change my .sh then?
      • I'm not very familiar with postgres so i'm not sure what the options are
      • thumpba joined the channel
      • Jelmer_ joined the channel
      • gwz
        you would need to change your psql scripts which is probably a lot of work
      • the best thing to do is start postgres as daemon then connect a container which has the shell scripts and link it to postgres
      • at that point, postgres would have started and you can connect to it from another container
      • i am not an expert at this either but that's what worked for me
      • codey
        gotcha, that makes sense
      • docker compose is what i would use to make that easiest right?
      • otter768 joined the channel
      • for auto starting the second container
      • juanpablo_ has quit
      • dimsum__ joined the channel
      • gwz
        you can yes
      • Spr0cket joined the channel
      • what is the postgres going to be used for anyways
      • thumpba has quit
      • codey
        nipap. it's just an ip address management system.
      • it needs postgres and has a few sql scripts that it uses to setup the tables
      • Pinchiukas joined the channel
      • gwz
        is nipap going to be running in a container too
      • jlle has quit
      • codey
        yeah, one for it's daemon that talks to the db and another for it's wsgi app
      • gwz
        then you can just run the initialization scripts in one of those
      • MartinCleaver joined the channel
      • codey
        ah, that's true.
      • djm- joined the channel
      • thanks for your help, i'll try here soon and let you know.
      • gwz
        np
      • codey
        just stared learning docker last night lol
      • ocdmw joined the channel
      • forbiddenera
        meow!
      • gwz
        yuh i only started a week back as well for one of the solutions needed at work, pretty cool
      • basichash joined the channel
      • basichash
        Why does curl -L https://github.com/docker/compose/releases/down... -s`-`uname -m` > /usr/local/bin/docker-compose
      • chmod +x /usr/local/bin/docker-compose
      • return "permission denied"?
      • forbiddenera
        core os?
      • codey
        because your user probably doesn't have permission to where you're redirecting
      • forbiddenera
        what he said :)
      • but if its coreOS you'd want to put it in /opt/bin
      • codey
        you could use 'sudo tee' to get it to work
      • basichash
        i'm on ubuntu
      • forbiddenera
        you can't write to /usr/local
      • ah
      • in that case
      • codey
        or really just do 'sudo -i' then the command
      • forbiddenera
        sudo
      • basichash
        ok thanks, will try
      • codey
        sudo on the curl won't elevate the redirect and 'sudo -i' is easier to remember then the exact 'tee' combo. :)
      • danzilio joined the channel
      • forbiddenera
        smart
      • ;)
      • MartinCleaver has quit
      • anyone have an interesting take on persistence with docker/coreos
      • i was thinking of using storage containers but id like to be able to chunk them to sizes too maybe would be nice ala quota have 40gb storage containers i can fit x per node on x node or y per node on y node
      • dunno tho.. i plan on using ssd and sata for storage with a LRU method and .. don't know what's out there for that..
      • tcurdt joined the channel
      • gwz
        how are you writing to those containers
      • codey
        i tried using coreos originally a few weeks ago but from where i had never used docker or containers to begin with and really never dealt with server distribution of that scale
      • had a pretty big curve for me
      • i'm enjoying plain docker on limited setups currently though.
      • forbiddenera
        really? I found coreos really easy to learn and stupidly simple
      • n0n3such joined the channel
      • MattJ has quit
      • and, I'd be writing to the containers several ways but mostly through another container (eg couchbase) attaching a volume to the storage container for it's data
      • ie /var/opt/couchbase or whatever, or like /var/lib/mysql/* for mysql if that were the case yknow
      • basichash
        trying to use sane stack, which requires docker, but getitng this error when trying to create a new project: https://gist.github.com/anonymous/0be7ae9cc3612...
      • do i need to start the docker daemon or something?
      • forbiddenera
        couchbase will already cache LRU in ram and persist to storage but i can't tell it (yet, i think they're working on this) to use different storage with different preferences
      • id have to make two cb clusters with a ssd container and a sata container :/
      • if you're running any container the daemon needs to run, basichash
      • Pinchiukas
        How would I run a couple of services in a single container?
      • basichash
        thanks
      • forbiddenera
        i suppose i could write a script that pulls data from a ssd-based bucket to a sata-based bucket once the ssd-bucket starts to get full and put the older data down to sata
      • Pinchiukas: something like phusion would work good
      • easy way to do it
      • or write a script / program to instantiate the two services and monitor them
      • but then you have to do init like stuff and well might as well just use phusion because it comes with my_init.sh
      • forbiddenera dances around the room bored.
      • forbiddenera needs to design this storage framework and dunno how he wants to do it.
      • forbiddenera could do the openstack thing but, while i want that to be a feature, i dont want to rely on its
      • ceposta has quit
      • basichash
        forbiddenera: hmm still says it's not running, despite stoppping then start docker -d
      • forbiddenera: specifically "sails version: Couldn't connect to Docker daemon at http+unix://var/run/docker.sock - is it running?"
      • thomasem has quit
      • roamingdog has quit
      • nickstenn joined the channel
      • forbiddenera
        poossible to do volume quotas without lxm?
      • are you sure its running ?
      • ps aux | grep docker
      • jkyle joined the channel
      • _diogo joined the channel
      • basichash
        root 18768 1.4 0.1 421964 15664 ? Ssl 01:42 0:16 /usr/bin/docker -d
      • root 25149 0.0 0.0 91100 2560 pts/17 S+ 01:54 0:00 sudo docker -d
      • root 25150 0.0 0.1 256248 10964 pts/17 Sl+ 01:54 0:00 docker -d
      • user 29300 0.0 0.0 17416 924 pts/18 S+ 02:01 0:00 grep docker
      • djm- joined the channel
      • forbiddenera
        its running 3 times!
      • no wonder it doesnt wanna work ;)
      • and anything >2 lines on irc should really gist/pb
      • but yeah kill those then restart the proper process
      • basichash
        ah ok thanks
      • forbiddenera
        dont just run docker -d -- your system has a management script for it.. probably service stop/start docker
      • rossriley has quit
      • ore systemctl docker start
      • tcurdt
        I have a container that exposes port 3000 and ps -a shows "3000/tcp" .. but the docker host is not listening on that port!? netstat -nl | grep 3000 is empty