Skip to content

Commit 911b9ae

Browse files
committed
dockerfile: add dockerfile for gitbase
Signed-off-by: Miguel Molina <[email protected]>
1 parent 300fc41 commit 911b9ae

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ deploy:
5050
skip_cleanup: true
5151
on:
5252
tags: true
53+
54+
after_deploy:
55+
- DOCKER_PUSH_LATEST=1 make docker-push

Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM golang:1.10 as builder
2+
3+
RUN mkdir -p /go/src/github.com/src-d/gitbase
4+
WORKDIR /go/src/github.com/src-d/gitbase
5+
COPY . .
6+
7+
RUN apt-get update && apt-get install libxml2-dev -y
8+
RUN go get github.com/golang/dep/...
9+
RUN dep ensure
10+
RUN cd vendor/gopkg.in/bblfsh/client-go.v2 && make dependencies
11+
RUN go install -v github.com/src-d/gitbase/...
12+
13+
FROM ubuntu:16.04
14+
15+
COPY --from=builder /go/bin/gitbase /bin
16+
RUN mkdir -p /opt/repos
17+
18+
ENV GITBASE_USER=gitbase
19+
ENV GITBASE_PASSWORD=""
20+
EXPOSE 3306
21+
22+
RUN apt-get update && apt-get install libxml2-dev git -y \
23+
&& apt-get clean \
24+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25+
26+
CMD gitbase server -v \
27+
--host=0.0.0.0 \
28+
--port=3306 \
29+
--user="$GITBASE_USER" \
30+
--password="$GITBASE_PASSWORD" \
31+
--git=/opt/repos

0 commit comments

Comments
 (0)