forked from satoshipay/docker-stellar-horizon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (31 loc) · 1.16 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
38
39
40
41
42
43
44
45
46
47
# Build stage
FROM golang:1.11.5-alpine3.8 AS builder
WORKDIR /go/src/github.com/stellar/go
RUN apk add --update --no-cache curl git mercurial
ARG GOOS=linux
ARG GOARCH=amd64
ARG CGO_ENABLED=0
ARG DEP_VERSION=0.5.0
ARG DEP_SHA256SUM=287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83
COPY scripts/install_dep.sh /tmp/
RUN /tmp/install_dep.sh
ARG HORIZON_VERSION=v0.15.4
RUN git clone https://github.com/stellar/go.git . \
&& git checkout horizon-${HORIZON_VERSION}
RUN dep ensure -v
RUN go install -ldflags "-X github.com/stellar/go/support/app.version=$HORIZON_VERSION" github.com/stellar/go/services/horizon
# Release stage
FROM busybox:1.29.2
ARG VCS_REF
ARG BUILD_DATE
LABEL maintainer="Mobius Operations Team <[email protected]>"
LABEL org.label-schema.build-date="${BUILD_DATE}"
LABEL org.label-schema.vcs-ref="${VCS_REF}"
LABEL org.label-schema.vcs-url="https://github.com/mobius-network/docker-stellar-horizon/"
LABEL org.label-schema.name="horizon"
COPY --from=builder /go/bin/horizon /usr/local/bin/horizon
COPY scripts/entrypoint.sh /entrypoint.sh
EXPOSE 8000
USER nobody
WORKDIR /tmp
ENTRYPOINT ["/entrypoint.sh", "/usr/local/bin/horizon"]