Skip to content

Commit

Permalink
Switch corerp from distroless to alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
kachawla committed May 17, 2023
1 parent 0856378 commit 11d0f22
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ jobs:
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Build Git binary
run: |
make build-git
- name: Push container images (latest)
run: |
make docker-test-image-build && make docker-test-image-push
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
:hourglass: Building Radius and pushing container images for functional tests...
- name: Build and Push container images
run: |
make build && make build-git && make docker-build && make docker-push
make build && make docker-build && make docker-push
env:
DOCKER_REGISTRY: ${{ env.CACHE_REGISTRY }}
DOCKER_TAG_VERSION: ${{ env.REL_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
ARROW := \033[34;1m=>\033[0m

# order matters for these
include build/help.mk build/version.mk build/build.mk build/util.mk build/generate.mk build/test.mk build/controller.mk build/git.mk build/docker.mk build/recipes.mk build/install.mk build/debug.mk
include build/help.mk build/version.mk build/build.mk build/util.mk build/generate.mk build/test.mk build/controller.mk build/docker.mk build/recipes.mk build/install.mk build/debug.mk
16 changes: 12 additions & 4 deletions deploy/images/appcore-rp/Dockerfile
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"]

0 comments on commit 11d0f22

Please sign in to comment.