Skip to content

Commit

Permalink
Adding rootless run
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Wetlesen committed Sep 16, 2022
1 parent e6ac6b9 commit 288370d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 288370d

Please sign in to comment.