Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Dockerfile for building Drone.io Docker containers. #69

Merged
merged 1 commit into from
Feb 13, 2014
Merged

Add a Dockerfile for building Drone.io Docker containers. #69

merged 1 commit into from
Feb 13, 2014

Conversation

whitlockjc
Copy link

With the help/direction of @bradrydzewski and @crosbymichael, I have created the Dockerfile included in this commit. I've tested this locally and was able to successfully create a Docker container image for Drone and run it using Docker. This will be a huge help for people wanting to develop/run Drone without being on a Linux box.

I tested this on OS X 10.9.1 using boot2docker 0.5.4 and Docker 0.8.0.

@bradrydzewski
Copy link

great, merging now. did you try running a build? that might fail since it expects Docker to be running

bradrydzewski added a commit that referenced this pull request Feb 13, 2014
Add a Dockerfile for building Drone.io Docker containers.
@bradrydzewski bradrydzewski merged commit 39d80e9 into harness:master Feb 13, 2014
@whitlockjc
Copy link
Author

Here is what I've done to this point:

# Build the container
docker build -t whitlockjc/drone .

# Run the container
docker run -p 8080:80 whitlockjc/drone

Once the container is running, I could open http:https://localhost:8080/install on my host system and perform the Drone installation but I didn't actually perform a build. I'll do that and update accordingly.

@whitlockjc
Copy link
Author

I guess I got a little too excited seeing Drone running. As I try to perform a build, I've hooked up to a GitHub repository but I don't see any way to configure a build or force it. With no documentation, this part will be hard to test. Got any tips?

@bradrydzewski
Copy link

add a .drone.yml file to your repository with your build configuration. There is some documentation in the README, however, I need to spend a lot more time improving the docs.

There is one issue. A build is triggered by a change to your repository, at which point GitHub sends a hook to Drone. Since you are running Drone locally (on localhost) GitHub will not be able to send the hook.

Since Drone is still very new, I really recommend testing Drone on Digital Ocean. You can get an Ubuntu server for $5 with Docker pre-installed with a static IP address. Check out this blog post someone put together:
http:https://jipiboily.com/2014/from-zero-to-fully-working-ci-server-in-less-than-10-minutes-with-drone-docker

I think having a Dockerfile is still really valuable

@whitlockjc
Copy link
Author

Yup, that's the issue I was running into. The GitHub webhook is undeliverable. Makes sense. I'll work on getting a full roundtrip going but the usefulness of the Dockerfile is the same regardless. We might have to alter the Dockerfile a tad if something comes up but we won't know until we get there. I'll create a new PR if need be.

@afex
Copy link

afex commented Feb 13, 2014

you can use a service like https://ngrok.com/ to test github webhooks being sent to your locally running drone daemon

@whitlockjc
Copy link
Author

Thanks @afex, that was just the tool I needed. Seems @bradrydzewski was right, the drone container cannot talk to docker: dial tcp 0.0.0.0:4243: connection refused. I'm sure you've ran into this before so if you have any tips, let me know.

@whitlockjc
Copy link
Author

So, I was able to get build working. You need to use a Docker workaround for now (until introspection support is available). Here is the command to use: docker run -v /var/run/docker.sock:/var/run/docker.sock -p 8080:80 -d whitlockjc/drone

johannesHarness pushed a commit that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants