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

Update base Docker image for building Feast Serving image #535

Merged
merged 2 commits into from
Mar 16, 2020
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
3 changes: 2 additions & 1 deletion infra/docker/core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WORKDIR /build
#
ENV MAVEN_OPTS="-Dmaven.repo.local=/build/.m2/repository -DdependencyLocationsEnabled=false"
RUN mvn --also-make --projects core,ingestion -Drevision=$REVISION \
-DskipTests=true --batch-mode package
-DskipTests=true --batch-mode clean package
#
# Unpack the jar and copy the files into production Docker image
# for faster startup time when starting Dataflow jobs from Feast Core.
Expand All @@ -32,6 +32,7 @@ RUN apt-get -qq update && apt-get -y install unar && \
FROM openjdk:11-jre as production
ARG REVISION=dev
COPY --from=builder /build/core/target/feast-core-$REVISION.jar /opt/feast/feast-core.jar
# Required for staging jar dependencies when submitting Dataflow jobs.
COPY --from=builder /build/core/target/feast-core-$REVISION /opt/feast/feast-core
CMD ["java",\
"-Xms2048m",\
Expand Down
19 changes: 10 additions & 9 deletions infra/docker/serving/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Build stage 1: Builder
# ============================================================

FROM maven:3.6-jdk-11-slim as builder
FROM maven:3.6-jdk-11 as builder
ARG REVISION=dev
COPY . /build
WORKDIR /build
Expand All @@ -13,22 +13,23 @@ WORKDIR /build
#
ENV MAVEN_OPTS="-Dmaven.repo.local=/build/.m2/repository -DdependencyLocationsEnabled=false"
RUN mvn --also-make --projects serving -Drevision=$REVISION \
-DskipTests=true --batch-mode package

# ============================================================
# Build stage 2: Production
# ============================================================

FROM openjdk:11-jre-alpine as production
ARG REVISION=dev
-DskipTests=true --batch-mode clean package
#
# Download grpc_health_probe to run health check for Feast Serving
# https://kubernetes.io/blog/2018/10/01/health-checking-grpc-servers-on-kubernetes/
#
RUN wget -q https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.3.1/grpc_health_probe-linux-amd64 \
-O /usr/bin/grpc-health-probe && \
chmod +x /usr/bin/grpc-health-probe

# ============================================================
# Build stage 2: Production
# ============================================================

FROM openjdk:11-jre-slim as production
ARG REVISION=dev
COPY --from=builder /build/serving/target/feast-serving-$REVISION.jar /opt/feast/feast-serving.jar
COPY --from=builder /usr/bin/grpc-health-probe /usr/bin/grpc-health-probe
CMD ["java",\
"-Xms1024m",\
"-Xmx1024m",\
Expand Down
2 changes: 1 addition & 1 deletion infra/docker/serving/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jre-alpine as production
FROM openjdk:11-jre as production
ARG REVISION=dev
#
# Download grpc_health_probe to run health check for Feast Serving
Expand Down