You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by yi...@apache.org on 2023/06/27 00:57:05 UTC
[spark-docker] branch master updated: [SPARK-44176] Change apt to apt-get and remove useless cleanup
This is an automated email from the ASF dual-hosted git repository.
yikun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-docker.git
The following commit(s) were added to refs/heads/master by this push:
new 6f1a0a5 [SPARK-44176] Change apt to apt-get and remove useless cleanup
6f1a0a5 is described below
commit 6f1a0a5fbb8034ebc4ea04e4f0b2fda728a4dd1e
Author: Yikun Jiang <yi...@gmail.com>
AuthorDate: Tue Jun 27 08:56:54 2023 +0800
[SPARK-44176] Change apt to apt-get and remove useless cleanup
### What changes were proposed in this pull request?
This patch change `apt` to `apt-get` and also remove useless `rm -rf /var/cache/apt/*; \`.
And also apply the change to 3.4.0 and 3.4.1
### Why are the changes needed?
Address comments from DOI:
- `apt install ...`, This should be apt-get (apt is not intended for unattended use, as the warning during build makes clear).
- `rm -rf /var/cache/apt/*; \` This is harmless, but should be unnecessary (the base image configuration already makes sure this directory stays empty).
See more in:
[1] https://github.com/docker-library/official-images/pull/13089#issuecomment-1601813499
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
CI passed
Closes #47 from Yikun/apt-get.
Authored-by: Yikun Jiang <yi...@gmail.com>
Signed-off-by: Yikun Jiang <yi...@gmail.com>
---
3.4.0/scala2.12-java11-python3-r-ubuntu/Dockerfile | 5 ++---
3.4.0/scala2.12-java11-python3-ubuntu/Dockerfile | 3 +--
3.4.0/scala2.12-java11-r-ubuntu/Dockerfile | 3 +--
3.4.0/scala2.12-java11-ubuntu/Dockerfile | 3 +--
3.4.1/scala2.12-java11-python3-r-ubuntu/Dockerfile | 5 ++---
3.4.1/scala2.12-java11-python3-ubuntu/Dockerfile | 3 +--
3.4.1/scala2.12-java11-r-ubuntu/Dockerfile | 3 +--
3.4.1/scala2.12-java11-ubuntu/Dockerfile | 3 +--
Dockerfile.template | 3 +--
r-python.template | 5 ++---
10 files changed, 13 insertions(+), 23 deletions(-)
diff --git a/3.4.0/scala2.12-java11-python3-r-ubuntu/Dockerfile b/3.4.0/scala2.12-java11-python3-r-ubuntu/Dockerfile
index 0f1962f..10aa23e 100644
--- a/3.4.0/scala2.12-java11-python3-r-ubuntu/Dockerfile
+++ b/3.4.0/scala2.12-java11-python3-r-ubuntu/Dockerfile
@@ -20,9 +20,8 @@ USER root
RUN set -ex; \
apt-get update; \
- apt install -y python3 python3-pip; \
- apt install -y r-base r-base-dev; \
- rm -rf /var/cache/apt/*; \
+ apt-get install -y python3 python3-pip; \
+ apt-get install -y r-base r-base-dev; \
rm -rf /var/lib/apt/lists/*
ENV R_HOME /usr/lib/R
diff --git a/3.4.0/scala2.12-java11-python3-ubuntu/Dockerfile b/3.4.0/scala2.12-java11-python3-ubuntu/Dockerfile
index 258d806..3240e57 100644
--- a/3.4.0/scala2.12-java11-python3-ubuntu/Dockerfile
+++ b/3.4.0/scala2.12-java11-python3-ubuntu/Dockerfile
@@ -20,8 +20,7 @@ USER root
RUN set -ex; \
apt-get update; \
- apt install -y python3 python3-pip; \
- rm -rf /var/cache/apt/*; \
+ apt-get install -y python3 python3-pip; \
rm -rf /var/lib/apt/lists/*
USER spark
diff --git a/3.4.0/scala2.12-java11-r-ubuntu/Dockerfile b/3.4.0/scala2.12-java11-r-ubuntu/Dockerfile
index 4c928c6..266392f 100644
--- a/3.4.0/scala2.12-java11-r-ubuntu/Dockerfile
+++ b/3.4.0/scala2.12-java11-r-ubuntu/Dockerfile
@@ -20,8 +20,7 @@ USER root
RUN set -ex; \
apt-get update; \
- apt install -y r-base r-base-dev; \
- rm -rf /var/cache/apt/*; \
+ apt-get install -y r-base r-base-dev; \
rm -rf /var/lib/apt/lists/*
ENV R_HOME /usr/lib/R
diff --git a/3.4.0/scala2.12-java11-ubuntu/Dockerfile b/3.4.0/scala2.12-java11-ubuntu/Dockerfile
index aa754b7..77ace47 100644
--- a/3.4.0/scala2.12-java11-ubuntu/Dockerfile
+++ b/3.4.0/scala2.12-java11-ubuntu/Dockerfile
@@ -24,7 +24,7 @@ RUN groupadd --system --gid=${spark_uid} spark && \
RUN set -ex; \
apt-get update; \
ln -s /lib /lib64; \
- apt install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user libnss3 procps net-tools gosu libnss-wrapper; \
+ apt-get install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user libnss3 procps net-tools gosu libnss-wrapper; \
mkdir -p /opt/spark; \
mkdir /opt/spark/python; \
mkdir -p /opt/spark/examples; \
@@ -33,7 +33,6 @@ RUN set -ex; \
touch /opt/spark/RELEASE; \
chown -R spark:spark /opt/spark; \
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su; \
- rm -rf /var/cache/apt/*; \
rm -rf /var/lib/apt/lists/*
# Install Apache Spark
diff --git a/3.4.1/scala2.12-java11-python3-r-ubuntu/Dockerfile b/3.4.1/scala2.12-java11-python3-r-ubuntu/Dockerfile
index 95c98b9..30e6b86 100644
--- a/3.4.1/scala2.12-java11-python3-r-ubuntu/Dockerfile
+++ b/3.4.1/scala2.12-java11-python3-r-ubuntu/Dockerfile
@@ -20,9 +20,8 @@ USER root
RUN set -ex; \
apt-get update; \
- apt install -y python3 python3-pip; \
- apt install -y r-base r-base-dev; \
- rm -rf /var/cache/apt/*; \
+ apt-get install -y python3 python3-pip; \
+ apt-get install -y r-base r-base-dev; \
rm -rf /var/lib/apt/lists/*
ENV R_HOME /usr/lib/R
diff --git a/3.4.1/scala2.12-java11-python3-ubuntu/Dockerfile b/3.4.1/scala2.12-java11-python3-ubuntu/Dockerfile
index 8b4dcc9..124ef71 100644
--- a/3.4.1/scala2.12-java11-python3-ubuntu/Dockerfile
+++ b/3.4.1/scala2.12-java11-python3-ubuntu/Dockerfile
@@ -20,8 +20,7 @@ USER root
RUN set -ex; \
apt-get update; \
- apt install -y python3 python3-pip; \
- rm -rf /var/cache/apt/*; \
+ apt-get install -y python3 python3-pip; \
rm -rf /var/lib/apt/lists/*
USER spark
diff --git a/3.4.1/scala2.12-java11-r-ubuntu/Dockerfile b/3.4.1/scala2.12-java11-r-ubuntu/Dockerfile
index a1dd367..1c9fc38 100644
--- a/3.4.1/scala2.12-java11-r-ubuntu/Dockerfile
+++ b/3.4.1/scala2.12-java11-r-ubuntu/Dockerfile
@@ -20,8 +20,7 @@ USER root
RUN set -ex; \
apt-get update; \
- apt install -y r-base r-base-dev; \
- rm -rf /var/cache/apt/*; \
+ apt-get install -y r-base r-base-dev; \
rm -rf /var/lib/apt/lists/*
ENV R_HOME /usr/lib/R
diff --git a/3.4.1/scala2.12-java11-ubuntu/Dockerfile b/3.4.1/scala2.12-java11-ubuntu/Dockerfile
index 8028ce6..e782686 100644
--- a/3.4.1/scala2.12-java11-ubuntu/Dockerfile
+++ b/3.4.1/scala2.12-java11-ubuntu/Dockerfile
@@ -24,7 +24,7 @@ RUN groupadd --system --gid=${spark_uid} spark && \
RUN set -ex; \
apt-get update; \
ln -s /lib /lib64; \
- apt install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user libnss3 procps net-tools gosu libnss-wrapper; \
+ apt-get install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user libnss3 procps net-tools gosu libnss-wrapper; \
mkdir -p /opt/spark; \
mkdir /opt/spark/python; \
mkdir -p /opt/spark/examples; \
@@ -33,7 +33,6 @@ RUN set -ex; \
touch /opt/spark/RELEASE; \
chown -R spark:spark /opt/spark; \
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su; \
- rm -rf /var/cache/apt/*; \
rm -rf /var/lib/apt/lists/*
# Install Apache Spark
diff --git a/Dockerfile.template b/Dockerfile.template
index fc67534..6fedce9 100644
--- a/Dockerfile.template
+++ b/Dockerfile.template
@@ -24,7 +24,7 @@ RUN groupadd --system --gid=${spark_uid} spark && \
RUN set -ex; \
apt-get update; \
ln -s /lib /lib64; \
- apt install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user libnss3 procps net-tools gosu libnss-wrapper; \
+ apt-get install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user libnss3 procps net-tools gosu libnss-wrapper; \
mkdir -p /opt/spark; \
mkdir /opt/spark/python; \
mkdir -p /opt/spark/examples; \
@@ -33,7 +33,6 @@ RUN set -ex; \
touch /opt/spark/RELEASE; \
chown -R spark:spark /opt/spark; \
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su; \
- rm -rf /var/cache/apt/*; \
rm -rf /var/lib/apt/lists/*
# Install Apache Spark
diff --git a/r-python.template b/r-python.template
index 2cc3be0..e3eb01a 100644
--- a/r-python.template
+++ b/r-python.template
@@ -21,12 +21,11 @@ USER root
RUN set -ex; \
apt-get update; \
{%- if HAVE_PY %}
- apt install -y python3 python3-pip; \
+ apt-get install -y python3 python3-pip; \
{%- endif %}
{%- if HAVE_R %}
- apt install -y r-base r-base-dev; \
+ apt-get install -y r-base r-base-dev; \
{%- endif %}
- rm -rf /var/cache/apt/*; \
rm -rf /var/lib/apt/lists/*
{%- if HAVE_R %}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org