forked from uc-cdis/arborist
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 681 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (19 loc) · 681 Bytes
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
FROM quay.io/cdis/golang:1.17-bullseye as build-deps
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
RUN apt-get update \
&& apt-get install -y --no-install-recommends jq=1.* postgresql=13* \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR $GOPATH/src/github.com/uc-cdis/arborist/
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN GITCOMMIT=$(git rev-parse HEAD) \
GITVERSION=$(git describe --always --tags) \
&& go build \
-ldflags="-X 'github.com/uc-cdis/arborist/arborist/version.GitCommit=${GITCOMMIT}' -X 'github.com/uc-cdis/arborist/arborist/version.GitVersion=${GITVERSION}'" \
-o bin/arborist
CMD ["bin/arborist"]