-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch corerp from distroless to alpine
- Loading branch information
Showing
4 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
# Note: distroless already includes ca-certificates | ||
FROM --platform=${TARGETPLATFORM:-linux/amd64} gcr.io/distroless/static:nonroot | ||
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:latest | ||
|
||
ARG TARGETPLATFORM | ||
ARG TARGETARCH | ||
|
||
# Install ca-certificates | ||
RUN apk --no-cache add ca-certificates | ||
|
||
# Install Git (required for Terraform module downloads) | ||
RUN apk --no-cache add git | ||
|
||
# Create non-root user | ||
RUN addgroup -g 65532 rpuser && \ | ||
adduser -u 65532 -G rpuser -s /bin/sh -D rpuser | ||
|
||
WORKDIR / | ||
|
||
COPY ./linux_${TARGETARCH:-amd64}/release/appcore-rp / | ||
COPY ./gitbinary/git /usr/local/bin/ | ||
|
||
USER 65532:65532 | ||
USER rpuser | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT ["/appcore-rp"] |