Skip to content

Commit e16a378

Browse files
committed
dockerfile cleanup, reduce image size
Signed-off-by: Tommy Hughes <tohughes@redhat.com>
1 parent 1104753 commit e16a378

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
FROM debian:11-slim
2-
RUN apt update && \
3-
apt install -y \
4-
jq \
5-
python3 \
6-
python3-pip \
7-
python3-dev \
8-
build-essential
1+
FROM python:3.11-slim-bullseye
92

10-
RUN pip install pip --upgrade
11-
RUN pip install "feast[aws,gcp,snowflake,redis,go,mysql,postgres,opentelemetry,grpcio]"
3+
RUN pip install --no-cache-dir pip --upgrade
4+
RUN pip install --no-cache-dir "feast[aws,gcp,snowflake,redis,go,mysql,postgres,opentelemetry,grpcio]"
125

136

14-
RUN apt update
15-
RUN apt install -y -V ca-certificates lsb-release wget
16-
RUN 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
17-
RUN apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
18-
RUN apt update
19-
RUN apt -y install libarrow-dev
7+
RUN apt update && apt install -y -V ca-certificates lsb-release wget && \
8+
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 && \
9+
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && apt update && \
10+
apt install -y \
11+
jq \
12+
libarrow-dev && \
13+
apt remove -y lsb-release wget && \
14+
apt-get clean && rm -rf /var/cache/apt/lists
15+
2016
# modify permissions to support running with a random uid
2117
RUN mkdir -m 775 /.cache
2218
RUN chmod g+w $(python3 -c "import feast.ui as _; print(_.__path__)" | tr -d "[']")/build/projects-list.json
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
FROM debian:11-slim
1+
FROM python:3.11-slim-bullseye
22

3-
RUN apt update && \
4-
apt install -y \
5-
jq \
6-
python3 \
7-
python3-pip \
8-
python3-dev \
9-
build-essential
3+
RUN pip install --no-cache-dir pip --upgrade
4+
RUN pip install --no-cache-dir pip-tools
105

11-
RUN pip install pip --upgrade
12-
COPY . .
6+
RUN apt update && apt install -y -V ca-certificates lsb-release wget make git curl gcc && \
7+
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
8+
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 && \
9+
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && apt update && \
10+
apt install -y \
11+
jq \
12+
nodejs \
13+
libarrow-dev && \
14+
npm install -g yarn && \
15+
apt remove -y lsb-release wget && \
16+
apt-get clean && rm -rf /var/cache/apt/lists
1317

14-
RUN pip install "feast[aws,gcp,snowflake,redis,go,mysql,postgres,opentelemetry,grpcio]"
18+
COPY . /feast
19+
WORKDIR /feast
20+
RUN make install-python-ci-dependencies && pip cache purge
21+
ENV NPM_TOKEN '//registry.npmjs.org/:_authToken'
22+
RUN make build-ui && yarn cache clean
23+
24+
WORKDIR /
1525

16-
RUN apt update
17-
RUN apt install -y -V ca-certificates lsb-release wget
18-
RUN 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
19-
RUN apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
20-
RUN apt update
21-
RUN apt -y install libarrow-dev
2226
# modify permissions to support running with a random uid
2327
RUN mkdir -m 775 /.cache
2428
RUN chmod g+w $(python3 -c "import feast.ui as _; print(_.__path__)" | tr -d "[']")/build/projects-list.json

0 commit comments

Comments
 (0)