Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
- make packages
- export DOCKER_PUSH_LATEST=$(echo ${TRAVIS_BRANCH} | grep -E '^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$') || true
- make docker-push
- make static-package

deploy:
provider: releases
Expand Down
24 changes: 9 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
FROM golang:1.11-alpine as builder
FROM debian:stable-slim

RUN mkdir -p /go/src/github.com/src-d/gitbase
WORKDIR /go/src/github.com/src-d/gitbase
COPY . .

RUN apk add --update libxml2-dev git make bash gcc g++ curl oniguruma-dev
RUN go get github.com/golang/dep/...
RUN dep ensure
RUN cd vendor/gopkg.in/bblfsh/client-go.v2 && make dependencies
RUN make static-build

FROM alpine:3.8

COPY --from=builder /go/bin/gitbase /bin
COPY build/bin/gitbase /bin
RUN mkdir -p /opt/repos

ENV GITBASE_USER=root
Expand All @@ -21,9 +9,15 @@ ENV GITBASE_REPOS=/opt/repos
EXPOSE 3306

ENV TINI_VERSION v0.17.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

RUN apt-get update \
&& apt-get -y install libxml2 git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


ENTRYPOINT ["/tini", "--"]

CMD gitbase server -v \
Expand Down