Skip to content

Commit

Permalink
Create Dockerfile copy
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Jul 25, 2023
1 parent 4880cd8 commit 4a17650
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/algorand-indexer/Dockerfile copy
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
ARG GO_VERSION=1.17.5
FROM golang:$GO_VERSION-alpine as build

ENV HOME /opt/indexer
WORKDIR /opt/indexer

# Basic dependencies.
RUN apk add --no-cache git bzip2 make bash libtool boost-dev autoconf automake g++ patch

# Install indexer binaries.
ARG URL="https://github.com/algorand/indexer"
ARG BRANCH="master"

RUN echo "Installing from source. ${URL} -- ${BRANCH}"
RUN git clone --single-branch --branch "${BRANCH}" "${URL}" /opt/indexer
RUN make

FROM alpine:latest

# install runtime dependencies
RUN apk add --no-cache bash libstdc++
# copy build results
COPY --from=build /opt/indexer/cmd/algorand-indexer/algorand-indexer /tmp/

ARG INDEXER_PORT="8980"
ARG ALGOD_PORT="4001"
ARG TOKEN="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

ENV INDEXER_PORT=${INDEXER_PORT} \
ALGOD_PORT=${ALGOD_PORT} \
ALGOD_TOKEN=${TOKEN} \
INDEXER_ENABLE_ALL_PARAMETERS=true \
INDEXER_DATA=/tmp/indexer-data

RUN mkdir -p ${INDEXER_DATA}

EXPOSE $INDEXER_PORT

COPY ["start.sh", "/tmp/"]
CMD ["/tmp/start.sh"]

0 comments on commit 4a17650

Please sign in to comment.