Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Change feature-server and operator base images to ubi9 #4919

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ build-feast-operator-docker:
# Dev images

build-feature-server-dev:
docker buildx build --build-arg VERSION=dev \
docker buildx build \
-t feastdev/feature-server:dev \
-f sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev --load .

Expand Down
9 changes: 3 additions & 6 deletions infra/feast-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Build the manager binary
FROM golang:1.21 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 AS builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
Expand All @@ -23,11 +22,9 @@ COPY internal/controller/ internal/controller/
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
FROM registry.access.redhat.com/ubi9/ubi-micro:9.5
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /opt/app-root/src/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
19 changes: 4 additions & 15 deletions sdk/python/feast/infra/feature_servers/multicloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
FROM python:3.11-slim-bullseye
FROM registry.access.redhat.com/ubi9/python-311:9.5

RUN pip install --no-cache-dir pip --upgrade
RUN pip install --no-cache-dir "feast[aws,gcp,snowflake,redis,go,mysql,postgres,opentelemetry,grpcio,k8s,duckdb,milvus]"


RUN apt update && apt install -y -V ca-certificates lsb-release wget && \
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && apt update && \
apt install -y \
jq \
libarrow-dev && \
apt remove -y lsb-release wget && \
apt-get clean && rm -rf /var/cache/apt/lists
ARG VERSION
RUN pip install "feast[aws,gcp,snowflake,redis,go,mysql,postgres,opentelemetry,grpcio,k8s,duckdb,milvus]"==${VERSION}

# modify permissions to support running with a random uid
RUN mkdir -m 775 /.cache
RUN chmod g+w $(python3 -c "import feast.ui as _; print(_.__path__)" | tr -d "[']")/build/projects-list.json
RUN chmod g+w $(python -c "import feast.ui as ui; print(ui.__path__)" | tr -d "[']")/build/projects-list.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
FROM python:3.11-slim-bullseye
FROM registry.access.redhat.com/ubi9/python-311:9.5

RUN pip install --no-cache-dir pip --upgrade
RUN pip install --no-cache-dir pip-tools
COPY --chown=default . ${APP_ROOT}/src
RUN pip install --no-cache-dir pip-tools && \
make install-python-ci-dependencies && \
pip uninstall -y pip-tools

RUN apt update && apt install -y -V ca-certificates lsb-release wget make git curl gcc && \
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && apt update && \
apt install -y \
jq \
nodejs \
libarrow-dev && \
npm install -g yarn && \
apt remove -y lsb-release wget && \
apt-get clean && rm -rf /var/cache/apt/lists

COPY . /feast
WORKDIR /feast
RUN make install-python-ci-dependencies && pip cache purge
ENV NPM_TOKEN '//registry.npmjs.org/:_authToken'
RUN make build-ui && yarn cache clean

WORKDIR /
RUN npm install -S yarn
ENV PATH ${PATH}:${APP_ROOT}/src/node_modules/yarn/bin
RUN make build-ui && yarn cache clean --all

# modify permissions to support running with a random uid
RUN mkdir -m 775 /.cache
RUN chmod g+w $(python3 -c "import feast.ui as _; print(_.__path__)" | tr -d "[']")/build/projects-list.json
RUN chmod g+w $(python -c "import feast.ui as ui; print(ui.__path__)" | tr -d "[']")/build/projects-list.json
Loading