Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Add Docker support #24

Merged
merged 3 commits into from
Apr 18, 2016
Merged

Conversation

amcsi
Copy link
Contributor

@amcsi amcsi commented Apr 16, 2016

Cool project you have.

I helped Dockerize it for you.

I'd suggest you create an account on https://hub.docker.com/ for creating automated builds of the project, so users wouldn't have to build the project themselves. Also you could add yourself as the MAINTAINER of the Dockerfile which I left out, because I don't know your name/email ( like what I did in my project: https://github.com/amcsi/szeremi/blob/master/Dockerfile#L2 ).

@danistefanovic
Copy link
Owner

Hey Attila, thanks for your contribution! It works like a charm. Found just some minor improvements. Other than that, I think this is good to go. 👍

.git
node_modules
npm-debug.log*
webhooks.json
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add lib folder to .dockerignore, which is generated when you build the project locally

@danistefanovic danistefanovic mentioned this pull request Apr 17, 2016
3 tasks
@amcsi
Copy link
Contributor Author

amcsi commented Apr 17, 2016

Understood. I have made the commit with what you said and it seems to still work.

I'm still investigating how you can control Docker from within a container. I want to use your project to auto-pull and restart Docker containers with the help of Docker Hub webhooks, but I want to run hooka from within a container, because my server uses CoreOS where everything has to be in a container.

@amcsi
Copy link
Contributor Author

amcsi commented Apr 17, 2016

I was able to get docker ps to run within the container this way: docker run --rm -v ~/hooka/webhooks.json:/src/webhooks.json -p 3000:3000 --name hooka -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v /lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu -v /usr/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ hooka docker ps

I'm concerned of the last two lib mounts might be platform dependent, so I'm investigating a better way.

@danistefanovic
Copy link
Owner

I think there is no one-size-fits-all solution. I had to do this acrobatics to make it work under OSX with boot2docker:

docker run -v ~/Workspace/hooka/webhooks.json:/src/webhooks.json -v /usr/local/bin/docker:/usr/bin/docker -v $DOCKER_CERT_PATH:/certs -e "DOCKER_HOST=$DOCKER_HOST" -e "DOCKER_CERT_PATH=/certs" -e "DOCKER_TLS_VERIFY=1" hooka docker ps

@danistefanovic danistefanovic merged commit cce05dc into danistefanovic:master Apr 18, 2016
@amcsi
Copy link
Contributor Author

amcsi commented Apr 18, 2016

Oh crap i didnt realize i committed that change that removes the Expose command from the dockerfile. I think that command may be needed for things like random port binding to work

@danistefanovic
Copy link
Owner

No problem. I've fixed it d53b719

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants