From 2ec85a6638b126f592c5d2c2c4f88d26cedb73b4 Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Mon, 15 Jun 2015 20:25:29 -0700 Subject: [PATCH] add drone-config files, for setting up a standalone drone instance --- drone-config/Dockerfile | 26 ++++++++++++++++++++++ drone-config/run.sh | 6 +++++ drone-config/update.sh | 1 + drone-config/worker/Dockerfile | 40 ++++++++++++++++++++++++++++++++++ drone-config/worker/update.sh | 1 + 5 files changed, 74 insertions(+) create mode 100644 drone-config/Dockerfile create mode 100644 drone-config/run.sh create mode 100644 drone-config/update.sh create mode 100644 drone-config/worker/Dockerfile create mode 100644 drone-config/worker/update.sh diff --git a/drone-config/Dockerfile b/drone-config/Dockerfile new file mode 100644 index 0000000..90129e3 --- /dev/null +++ b/drone-config/Dockerfile @@ -0,0 +1,26 @@ +# Pull from base Ubuntu image +FROM ubuntu + +# Do system updates and install dependencies +RUN apt-get update +RUN apt-get -y upgrade +RUN sudo apt-get -y install git wget autopoint libfuse-dev libboost-serialization-dev +RUN apt-get clean + +# Download Drone.io +RUN wget http://downloads.drone.io/master/drone.deb +RUN dpkg -i drone.deb + +# Expose the Drone.io port +EXPOSE 8080 + +ENV DRONE_SERVER_PORT 0.0.0.0:8080 +ENV DRONE_DATABASE_DATASOURCE /var/lib/drone/drone.sqlite + +# Define our GitHub oAuth keys below +ENV DRONE_GITHUB_CLIENT +ENV DRONE_GITHUB_SECRET + +# The command we'll be running when the container starts +CMD /usr/local/bin/droned + diff --git a/drone-config/run.sh b/drone-config/run.sh new file mode 100644 index 0000000..3f036f3 --- /dev/null +++ b/drone-config/run.sh @@ -0,0 +1,6 @@ +docker run -d --name="drone-ci" \ + -p 8080:8080 \ + -v /var/lib/drone/ \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /home/core/droneio/drone.sqlite:/var/lib/drone/drone.sqlite \ + encfs_drone diff --git a/drone-config/update.sh b/drone-config/update.sh new file mode 100644 index 0000000..fd25822 --- /dev/null +++ b/drone-config/update.sh @@ -0,0 +1 @@ +docker build -t encfs_drone . diff --git a/drone-config/worker/Dockerfile b/drone-config/worker/Dockerfile new file mode 100644 index 0000000..159d5ed --- /dev/null +++ b/drone-config/worker/Dockerfile @@ -0,0 +1,40 @@ +FROM ubuntu:14.04 +MAINTAINER vgough + +# update and install dependencies +RUN apt-get update \ + && apt-get install -y \ + software-properties-common \ + wget \ + make \ + && echo 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.4 main' >> /etc/apt/sources.list \ + && wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - \ + && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ + && apt-get update \ + && apt-get install -y \ + gcc-4.9 g++-4.9 gcc-4.9-base \ + clang-3.4 lldb-3.4 \ + && apt-get clean \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 100 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 100 + +# build cmake +RUN wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz \ + && tar -xvf cmake-3.2.2.tar.gz +WORKDIR cmake-3.2.2 +RUN ./bootstrap \ + && make \ + && make install + + +RUN apt-get -y upgrade \ + && apt-get -y install \ + git \ + libfuse-dev \ + libboost-serialization-dev \ + libssl-dev \ + librlog-dev \ + gettext \ + libgettextpo-dev \ + && apt-get clean + diff --git a/drone-config/worker/update.sh b/drone-config/worker/update.sh new file mode 100644 index 0000000..c24ea00 --- /dev/null +++ b/drone-config/worker/update.sh @@ -0,0 +1 @@ +docker build -t encfs_worker .