CircleCI-Public / cimg-python

The Next-Gen CircleCI Python Docker Convenience Image.
https://circleci.com/developer/images/image/cimg/python
MIT License
33 stars 33 forks source link

E: Unable to locate package libsnappy-dev #18

Closed eddiewebb closed 4 years ago

eddiewebb commented 4 years ago

Migrated from circleci\python:3.6 to cimg\python:3.6 and get this

https://circleci.com/gh/ethereum/trinity/163465

eddiewebb commented 4 years ago

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] 
eddiewebb commented 4 years ago

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
eddiewebb commented 4 years ago

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.

FelicianoTech commented 4 years ago

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.