Skip to content

Commit

Permalink
[SPARK-30111][K8S] Apt-get update to fix debian issues
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Added apt-get update as per [docker best-practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get)

### Why are the changes needed?
Builder is failing because:
Without doing apt-get update, the APT lists get outdated and begins referring to package versions that no longer exist, hence the 404 trying to download them (Debian does not keep old versions in the archive when a package is updated).

### Does this PR introduce any user-facing change?
no

### How was this patch tested?
k8s builder

Closes #26753 from ifilonenko/SPARK-30111.

Authored-by: Ilan Filonenko <ifilonenko@bloomberg.net>
Signed-off-by: shane knapp <incomplete@gmail.com>
  • Loading branch information
ifilonenko authored and shaneknapp committed Dec 4, 2019
1 parent 5496e98 commit 708cf16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ USER 0

RUN mkdir ${SPARK_HOME}/R

RUN apt install -y r-base r-base-dev && rm -rf /var/cache/apt/*
RUN apt-get update && apt install -y r-base r-base-dev && rm -rf /var/cache/apt/*

COPY R ${SPARK_HOME}/R
ENV R_HOME /usr/lib/R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ USER 0

RUN mkdir ${SPARK_HOME}/python
# TODO: Investigate running both pip and pip3 via virtualenvs
RUN apt install -y python python-pip && \
RUN apt-get update && \
apt install -y python python-pip && \
apt install -y python3 python3-pip && \
# We remove ensurepip since it adds no functionality since pip is
# installed on the image and it just takes up 1.6MB on the image
Expand Down

0 comments on commit 708cf16

Please sign in to comment.