-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
beebd12
commit 3e065e8
Showing
1 changed file
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
FROM golang:1.12-alpine | ||
|
||
WORKDIR /etc | ||
ADD . . | ||
RUN apk update && \ | ||
apk add git make clang build-base pkgconfig openssh cmake libssh2 libssh2-dev openssl bash ninja | ||
RUN go get -u -d -v . | ||
RUN ./install.sh | ||
RUN ./gitql -v | ||
RUN echo "INSTALLED " $TARGET_OS_ARCH | ||
# run with: | ||
# docker build -t gitql . | ||
# docker run -it --entrypoint /bin/sh gitql:latest | ||
|
||
FROM golang:1.15.2-alpine3.12 as builder | ||
|
||
WORKDIR /src | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
|
||
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/gitql | ||
|
||
FROM alpine:3.12 | ||
RUN apk add -U git | ||
COPY --from=builder /bin/gitql /bin/ | ||
|
||
ENTRYPOINT ["gitql"] |