Comments (5)
It does automatically do a clean after each package install, which you can see with this command:
$ docker run --rm debian cat /etc/apt/apt.conf.d/docker-clean
# Since for most Docker users, package installs happen in "docker build" steps,
# they essentially become individual layers due to the way Docker handles
# layering, especially using CoW filesystems. What this means for us is that
# the caches that APT keeps end up just wasting space in those layers, making
# our layers unnecessarily large (especially since we'll normally never use
# these caches again and will instead just "docker build" again and make a brand
# new image).
# Ideally, these would just be invoking "apt-get clean", but in our testing,
# that ended up being cyclic and we got stuck on APT's lock, so we get this fun
# creation that's essentially just "apt-get clean".
DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };
APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };
Dir::Cache::pkgcache "";
Dir::Cache::srcpkgcache
# Note that we do realize this isn't the ideal way to do this, and are always
# open to better suggestions (https://github.com/docker/docker/issues).
Edit: there are a couple other files in that directory that may be relevant (languages, etc).
from rocker.
At some point I started to have the suspicion that Docker does that -- as I never see deb files in /var/cache/apt/archives
. But maybe I tricked myself ...
from rocker.
Yeah, I'm confused because on debian:testing
if I try apt-get install ed
without running apt-get update
it just says package not found
, but on r-base
it runs without an update
:
docker run --rm -it rocker/r-base bash
root@8c2f850457d6:/# apt-get install ed
Reading package lists... Done
Building dependency tree
Reading state information... Done
ed is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Seems like it has found some package lists to read? But then running apt-get clean
doesn't change this behavior, so I'm confused about what package list it's reading...
from rocker.
@cboettig I fear you are getting confused between package downloads and metadata about packages.
@wch Thanks, I suspected something like that. Nice find.
from rocker.
Thanks both!
from rocker.
Related Issues (20)
- r-base containers :4.1.2, :4.1.3, and latest break with ERROR: R_HOME ('/usr/lib/R') not found HOT 10
- Warning: unable to load shared object 'R_X11.so': libXt.so.6: cannot open shared object file HOT 2
- R Docker Images CVE's HOT 2
- Which is the latest Dockerfile? HOT 4
- Does r2u fit into Rocker? HOT 10
- OpenBLAS warning in r-base HOT 6
- Distroless R? HOT 2
- Use reticulate and python in docker container to deploy plumber api HOT 1
- libk5crypto in r-base image doesn't work: "Random number generator could not be seeded while getting initial credentials" HOT 8
- rocker/r-base:4.2.1: addgroup: addgroup with two arguments is an unspecified operation. HOT 3
- r-base:4.1.2 and higher on ppc64le does not work. HOT 4
- apt-get install failing for libssl-dev with dpkg error in docker build HOT 6
- Cannot connect to SQL database HOT 4
- cannot build docker due to usrmerge failing HOT 4
- `'lib = "/usr/local/lib/R/site-library"' is not writable` error when install R packages by non-root user HOT 3
- wiki: best practices for creating dockerfiles HOT 6
- `r-base` (Docker Official Image) is not updated HOT 5
- Migrating from Dockerhub? HOT 3
- Container for RStudio (not server) HOT 1
- MRAN repository snapshots were deleted - Failing jobs because packages can't be found anymore HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocker.