Skip to content

Commit

Permalink
add sh and composable user
Browse files Browse the repository at this point in the history
  • Loading branch information
rjonczy committed Dec 6, 2023
1 parent bab65ca commit f5ba296
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 f5ba296

Please sign in to comment.