Cleanup apt-update files after installation
MODIFY
repo2docker/buildpacks/r.py
repo2docker/buildpacks/r.py
@@ -257,22 +257,17 @@ class RBuildPack(PythonBuildPack):
scripts = [
(
"root",
- r"""
+ rf"""
apt-get update > /dev/null && \
apt-get install --yes --no-install-recommends \
libclang-dev \
- libzmq3-dev > /dev/null
- """,
- # apt-get -qq purge && \
- # apt-get -qq clean && \
- # rm -rf /var/lib/apt/lists/*
- ),
- (
- "root",
- rf"""
+ libzmq3-dev > /dev/null && \
wget --quiet -O /tmp/r-{self.r_version}.deb https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-{self.r_version}_1_amd64.deb && \
- apt install --yes --no-install-recommends /tmp/r-{self.r_version}.deb && \
+ apt install --yes --no-install-recommends /tmp/r-{self.r_version}.deb > /dev/null && \
rm /tmp/r-{self.r_version}.deb && \
+ apt-get -qq purge && \
+ apt-get -qq clean && \
+ rm -rf /var/lib/apt/lists/* && \
ln -s /opt/R/{self.r_version}/bin/R /usr/local/bin/R && \
ln -s /opt/R/{self.r_version}/bin/Rscript /usr/local/bin/Rscript && \
R --version

Cleanup apt-update files after installation