github.com/stellar/stellar-etl@v1.0.1-0.20240312145900-4874b6bf2b89/docker/Dockerfile (about)

     1  # stage 1: build stellar-etl app
     2  # golang 1.19, pinned by sha digest
     3  #FROM golang@sha256:04f76f956e51797a44847e066bde1341c01e09054d3878ae88c7f77f09897c4d AS build
     4  FROM golang:1.20.5-buster AS build
     5  
     6  WORKDIR /usr/src/etl
     7  
     8  # pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
     9  COPY go.mod go.sum ./
    10  RUN go mod download && go mod verify
    11  
    12  COPY . .
    13  RUN go build -v -o /usr/local/bin ./...
    14  
    15  # stage 2: runtime enviroment
    16  FROM stellar/stellar-core:20.2.0-1716.rc3.34d82fc00.focal
    17  
    18  WORKDIR /etl
    19  
    20  COPY --from=build /usr/local/bin/stellar-etl /usr/local/bin/stellar-etl
    21  COPY --from=build /usr/src/etl/docker docker
    22  
    23  # clear entrypoint from stellar-core image
    24  ENTRYPOINT []
    25  
    26  CMD ["stellar-etl"]