diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..3a518395d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# This is a Docker image for the Drone CI system. +# Use the following command to start the container: +# docker run -p 127.0.0.1:80:80 -t drone/drone + +FROM google/golang + +ADD . /gopath/src/github.com/drone/drone/ +WORKDIR /gopath/src/github.com/drone/drone + +RUN apt-get update +RUN apt-get -y install zip libsqlite3-dev sqlite3 1> /dev/null 2> /dev/null +RUN make deps build embed install + +EXPOSE 80 + +ENTRYPOINT ["/usr/local/bin/droned"] +CMD ["--port=:80"] diff --git a/Makefile b/Makefile index e67c8dd17..9369a0024 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ build: go build -o debian/drone/usr/local/bin/drone -ldflags "-X main.revision $(SHA)" github.com/drone/drone/client go build -o debian/drone/usr/local/bin/droned -ldflags "-X main.revision $(SHA)" github.com/drone/drone/server +install: + install -t /usr/local/bin debian/drone/usr/local/bin/drone + install -t /usr/local/bin debian/drone/usr/local/bin/droned + run: @go run server/main.go