From d1a2228f1cc1b0bec7023d226077e4002c07112a Mon Sep 17 00:00:00 2001 From: Tristan Storch Date: Fri, 29 Aug 2014 18:20:15 +0200 Subject: Docker mix and match setup Rewrite of the docker setup. Now uses fig to manage containers and container linkage. The base is a block based mix and match, which will give you the possibility to easily test all configurations. --- docker/blocks/docker_gogs_dev/Dockerfile | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 docker/blocks/docker_gogs_dev/Dockerfile (limited to 'docker/blocks/docker_gogs_dev') diff --git a/docker/blocks/docker_gogs_dev/Dockerfile b/docker/blocks/docker_gogs_dev/Dockerfile new file mode 100644 index 00000000..1c001e2c --- /dev/null +++ b/docker/blocks/docker_gogs_dev/Dockerfile @@ -0,0 +1,52 @@ +FROM ubuntu:14.04 + +# This part is taken from the official docker image -------------------- + +RUN apt-get update && apt-get install -y \ + build-essential ca-certificates curl \ + bzr git mercurial \ + --no-install-recommends + +ENV GOLANG_VERSION 1.3 + +RUN curl -sSL http://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \ + | tar -v -C /usr/src -xz +WORKDIR /usr/src/go + +RUN cd src && ./make.bash --no-clean 2>&1 + +ENV PATH /usr/src/go/bin:$PATH + +RUN mkdir -p /go/src +ENV GOPATH /go +ENV PATH /go/bin:$PATH +WORKDIR /go + +# ---------------------------------------------------------------------- + + +RUN useradd -m git + +ENV GOGS_PATH $GOPATH/src/github.com/gogits/gogs +ENV GOGS_CUSTOM_CONF_PATH $GOGS_PATH/custom/conf +ENV GOGS_CUSTOM_CONF $GOGS_CUSTOM_CONF_PATH/app.ini + +RUN go get -u -d github.com/gogits/gogs +# WORKDIR $GOGS_PATH +WORKDIR /go/src/github.com/gogits/gogs +RUN git checkout dev; go get -u; git checkout dev; go build +RUN chown -R git $GOGS_PATH + +ADD init_gogs.sh /tmp/ +RUN chown git /tmp/init_gogs.sh +RUN chmod +x /tmp/init_gogs.sh + +USER git +ENV HOME /home/git +ENV USER git +ENV PATH $GOGS_PATH:$PATH + +RUN git config --global user.name "GoGS" + +ENTRYPOINT ["/tmp/init_gogs.sh"] +CMD ["gogs", "web"] -- cgit v1.2.3