diff --git a/Makefile b/Makefile index 8252f48d46..8442b55874 100644 --- a/Makefile +++ b/Makefile @@ -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 . diff --git a/infra/feast-operator/Dockerfile b/infra/feast-operator/Dockerfile index aca26f9229..ad6ac7eaaa 100644 --- a/infra/feast-operator/Dockerfile +++ b/infra/feast-operator/Dockerfile @@ -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 @@ -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"] diff --git a/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile b/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile index e6afb46aad..fd3c258d89 100644 --- a/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile +++ b/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile @@ -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 diff --git a/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev b/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev index 7d31fc3600..add170fb1d 100644 --- a/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev +++ b/sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev @@ -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