-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (23 loc) · 1.27 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
# Branch/tag, latest active release by default, set to specific release
ARG STELLAR_CORE_VERSION="v11.3.0"
# ===============================================================================================
FROM astroband/docker-stellar-core-alpine:${STELLAR_CORE_VERSION} AS stellar-core
# ===============================================================================================
FROM golang:alpine AS build
RUN apk add --no-cache git build-base
RUN mkdir -p $GOPATH/src/github.com/astroband/stellar-parallel-catchup
WORKDIR $GOPATH/src/github.com/astroband/stellar-parallel-catchup
ADD . .
RUN GO111MODULE=on go build
# ===============================================================================================
FROM alpine:latest
ENV DATABASE_URL=postgres://localhost/core?sslmode=disable
ENV CONCURRENCY=3
ENV STELLAR_CORE=/root/stellar-core
WORKDIR /root
RUN apk add --no-cache libpq libstdc++ curl sqlite postgresql-client
COPY --from=stellar-core /usr/local/bin/stellar-core .
COPY --from=build /go/src/github.com/astroband/stellar-parallel-catchup/stellar-parallel-catchup .
COPY --from=build /go/src/github.com/astroband/stellar-parallel-catchup/templates/stellar-core.cfg ./stellar-core.cfg
RUN chmod +x ./stellar-parallel-catchup
CMD ["/root/stellar-parallel-catchup"]