diff --git a/Dockerfile b/Dockerfile index aef99ed..2322283 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,13 @@ RUN go build -ldflags="-s -w" -o autoagora-indexer-service ./src FROM ghcr.io/graphprotocol/indexer-service:${INDEXER_SERVICE_TAG} +# Upgrade everything: +RUN apt-get -y update && apt-get -y upgrade + +# Create a privilege drop user: +RUN groupadd -r indexer && useradd -r -m -s /bin/bash -d /var/lib/indexer -c 'Indexer Service' -g indexer indexer +RUN chown -R indexer:indexer /var/lib/indexer + WORKDIR /opt/autoagora/bin COPY --from=build /root/app/autoagora-indexer-service /opt/autoagora/bin/