-
Notifications
You must be signed in to change notification settings - Fork 46
/
Dockerfile
37 lines (33 loc) · 1.24 KB
/
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
# 1) build step (approx local build time ~4m w/o cache)
ARG GOLANG_VERSION=1.12
FROM golang:${GOLANG_VERSION} AS build
ADD . /go/src/github.com/insolar/insolar
WORKDIR /go/src/github.com/insolar/insolar
# pass build variables as arguments to avoid adding .git directory
ARG BUILD_NUMBER
ARG BUILD_DATE
ARG BUILD_TIME
ARG BUILD_HASH
ARG BUILD_VERSION
# build step
RUN BUILD_NUMBER=${BUILD_NUMBER} \
BUILD_DATE=${BUILD_DATE} \
BUILD_TIME=${BUILD_TIME} \
BUILD_HASH=${BUILD_HASH} \
BUILD_VERSION=${BUILD_VERSION} \
make vendor build
FROM debian:buster-slim
WORKDIR /go/src/github.com/insolar/insolar
RUN set -eux; \
groupadd -r insolar --gid=999; \
useradd -r -g insolar --uid=999 --shell=/bin/bash insolar
COPY --from=build /go/src/github.com/insolar/insolar/application/api/spec/api-exported.yaml /app/api-exported.yaml
# add script and configs required for network bootstrap
ADD scripts/kube/bootstrap/* /app/bootstrap/
COPY --from=build \
/go/src/github.com/insolar/insolar/bin/insolar \
/go/src/github.com/insolar/insolar/bin/insolard \
/go/src/github.com/insolar/insolar/bin/keeperd \
/go/src/github.com/insolar/insolar/bin/pulsard \
/go/src/github.com/insolar/insolar/bin/pulsewatcher \
/usr/local/bin/