Code Monkey home page Code Monkey logo

Comments (4)

eddiewebb avatar eddiewebb commented on July 23, 2024

Is this because we apt-get clean?

$ docker run -it test/base:18.04 bash
root@cdf1412d1027:~/project# apt-get install libsnappy-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libsnappy-dev
root@cdf1412d1027:~/project# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]                                                                        
Get:3 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]          
Get:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6,781 B]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [761 kB]                      
Get:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [10.5 kB]   
Get:7 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [795 kB]             
Get:8 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [19.2 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                  
Get:10 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.5 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [32.7 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,322 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,057 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2,496 B]
Get:20 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4,244 B]
Fetched 17.5 MB in 3s (5,811 kB/s)                            
Reading package lists... Done
root@cdf1412d1027:~/project# apt-get install libsnappy-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libsnappy1v5
The following NEW packages will be installed:
  libsnappy-dev libsnappy1v5
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 43.2 kB of archives.
After this operation, 156 kB of additional disk space will be used.
Do you want to continue? [Y/n] 

from cimg-python.

eddiewebb avatar eddiewebb commented on July 23, 2024

It's not clean, its removal of ../apt/lists, which saves 27MB from image

root@cdf1412d1027:~/project# ls -lh /var/lib/apt/lists
total 27M

from cimg-python.

eddiewebb avatar eddiewebb commented on July 23, 2024

Removing only the "universe" repo files removes ~20 MB of that, i don't know know about the various repos to say what we could/should eliminate.

from cimg-python.

felicianotech avatar felicianotech commented on July 23, 2024

This is a Docker best practice. It's not just about the filesize savings but prevents apt-get commands from one layer to affect anther layer in an inconsistent manner.

from cimg-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.