Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Add dockerfiles to repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
chancez committed Sep 8, 2014
1 parent 2503120 commit e7ac6f6
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
@@ -0,0 +1,10 @@
.vagrant
docs/build
build
cmake/plugin_loader.cmake
etc/
pipeline/mock_*.go
var/
*.sw?
externals
dockerfile/*
42 changes: 42 additions & 0 deletions Dockerfile
@@ -0,0 +1,42 @@
# heka_base image
FROM ubuntu:14.04

MAINTAINER Chance Zibolski <chance.zibolski@gmail.com> (@chance)

RUN apt-get update && \
apt-get install -yq --no-install-recommends \
build-essential \
bzr \
ca-certificates \
cmake \
curl \
git \
golang-goprotobuf-dev\
make \
mercurial \
patch \
ruby-dev \
protobuf-compiler \
python-sphinx \
wget

# Install Go 1.3
RUN curl -s https://storage.googleapis.com/golang/go1.3.1.linux-amd64.tar.gz | tar -v -C /usr/local -xz

WORKDIR /heka

ENV GOROOT /usr/local/go
ENV PATH $PATH:/usr/local/go/bin:/go/bin

ENV CTEST_OUTPUT_ON_FAILURE 1
ENV BUILD_DIR /heka/build
ENV GOPATH $BUILD_DIR/heka
ENV GOBIN $GOPATH/bin
ENV PATH $PATH:$GOBIN
# Build faster
ENV NUM_JOBS 10

EXPOSE 4352

COPY . /heka
RUN ./build.sh
1 change: 1 addition & 0 deletions docker/.dockerignore
@@ -0,0 +1 @@
build.sh
13 changes: 13 additions & 0 deletions docker/Dockerfile
@@ -0,0 +1,13 @@
# heka_build image
# Uses heka base which includes a built checkout of heka, and then builds a dpkg
# and builds a new image which installs that dpkg
FROM ecnahc515/heka_base

RUN mkdir -p /heka_docker
RUN cd /heka/build && make deb
RUN find /heka/build -name "*.deb" -exec cp {} /heka_docker/heka.deb \;
COPY Dockerfile.final /heka_docker/Dockerfile

RUN wget -nv https://get.docker.io/builds/Linux/x86_64/docker-latest -O /docker && chmod +x /docker

CMD /docker build -t ecnahc515/heka /heka_docker
10 changes: 10 additions & 0 deletions docker/Dockerfile.final
@@ -0,0 +1,10 @@
# heka image
# installs heka from a deb package
FROM ubuntu:14.04
MAINTAINER Chance Zibolski <chance.zibolski@gmail.com> (@chance)

ADD heka.deb /tmp/heka.deb
RUN dpkg -i /tmp/heka.deb && rm /tmp/heka.deb

EXPOSE 4352
ENTRYPOINT ["hekad"]
5 changes: 5 additions & 0 deletions docker/build_docker.sh
@@ -0,0 +1,5 @@
#!/bin/bash
docker build -t ecnahc515/heka_base ..
docker build --rm -t ecnahc515/heka_build .
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -ti --name heka_build ecnahc515/heka_build
docker rmi ecnahc515/heka_build

0 comments on commit e7ac6f6

Please sign in to comment.