Skip to content

Commit

Permalink
Merge pull request #278 from ComposableFi/chore/dockerfile-enhancements
Browse files Browse the repository at this point in the history
add sh and composable user
  • Loading branch information
rjonczy authored Dec 6, 2023
2 parents bab65ca + f5ba296 commit 1e1a4a5
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,30 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
-o /centauri/build/centaurid \
/centauri/cmd/centaurid


# --------------------------------------------------------
# Runner
# toolkit
# --------------------------------------------------------

FROM busybox:1.35.0-uclibc as busybox
RUN addgroup --gid 1025 -S composable && adduser --uid 1025 -S composable -G composable


# --------------------------------------------------------
# Runner
# --------------------------------------------------------
FROM ${RUNNER_IMAGE}

COPY --from=busybox:1.35.0-uclibc /bin/sh /bin/sh

COPY --from=builder /centauri/build/centaurid /bin/centaurid

ENV HOME /centauri
WORKDIR $HOME
# Install composable user
COPY --from=busybox /etc/passwd /etc/passwd
COPY --from=busybox --chown=1025:1025 /home/composable /home/composable

WORKDIR /home/composable
USER composable

# rest server
EXPOSE 1317
Expand All @@ -72,4 +86,5 @@ EXPOSE 26656
EXPOSE 26657
# grpc
EXPOSE 9090

ENTRYPOINT ["centaurid"]

0 comments on commit 1e1a4a5

Please sign in to comment.