-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
39 lines (28 loc) · 816 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM golang:alpine AS build
RUN apk add --no-cache \
git
RUN go get -d github.com/libgit2/git2go
RUN cd $GOPATH/src/github.com/libgit2/git2go \
&& git submodule update --init
RUN apk add --no-cache \
make\
cmake \
g++ \
openssl-dev \
libssh2-dev
RUN cd $GOPATH/src/github.com/libgit2/git2go \
&& make install-static
COPY . /go/src/github.com/jderusse/gitsplit/
RUN go get --tags "static" github.com/jderusse/gitsplit
RUN go build --tags "static" -o gitsplit github.com/jderusse/gitsplit
# ==================================================
FROM alpine
RUN apk add --no-cache \
git \
openssl \
openssh-client \
ca-certificates \
libssh2-dev
COPY --from=build /go/gitsplit /bin/gitsplit
WORKDIR /srv
CMD ["gitsplit"]