added a way to source packages for ubuntu containers
This commit is contained in:
parent
51e23619d1
commit
8d927c1b8e
9 changed files with 30 additions and 0 deletions
|
@ -22,8 +22,15 @@ We need local shell access to a system to run some commands to create a text fil
|
|||
|
||||
```
|
||||
# this will create a text file with the values
|
||||
# this originally worked on a VM.
|
||||
grep ^Source /var/lib/apt/lists/*_Packages | awk ' {print $2}' | sort -u > source_packages_remote_ubuntu_2004.default
|
||||
|
||||
# this works for me pulling the latest ubuntu docker container:
|
||||
# apply to all the ubuntu versions
|
||||
docker run ubuntu:latest /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u "
|
||||
```
|
||||
|
||||
|
||||
# it is grepping through information that is stored as follows. Below is an example from the package lvm2
|
||||
Package: liblvm2cmd2.03
|
||||
Architecture: amd64
|
||||
|
|
23
tools/ubuntu_package_puller/source_packages_names.sh
Executable file
23
tools/ubuntu_package_puller/source_packages_names.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
echo "Now sourcing packages from the following ubuntu distros containers:"
|
||||
|
||||
# ubuntu:latest
|
||||
docker run ubuntu:latest /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u" > package_data/ubuntu_latest_source_packages.container
|
||||
|
||||
# ubuntu:18.04
|
||||
docker run ubuntu:18.04 /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u" > package_data/ubuntu_18.04_source_packages.container
|
||||
|
||||
# ubuntu:20.04
|
||||
docker run ubuntu:20.04 /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u" > package_data/ubuntu_20.04_source_packages.container
|
||||
|
||||
# ubuntu:22.04
|
||||
docker run ubuntu:22.04 /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u" > package_data/ubuntu_22.04_source_packages.container
|
||||
|
||||
# ubuntu:22.10
|
||||
docker run ubuntu:22.10 /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u" > package_data/ubuntu_22.10_source_packages.container
|
||||
|
||||
# ubuntu:14.04
|
||||
docker run ubuntu:14.04 /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u" > package_data/ubuntu_14.04_source_packages.container
|
||||
|
||||
# ubuntu:16.04
|
||||
docker run ubuntu:16.04 /bin/bash -c "apt-get update && apt-get install lz4 && lz4cat /var/lib/apt/lists/*_Packages.lz4 | grep ^Source | cut -f 2 -d : | cut -f 2 -d ' ' | sort -u" > package_data/ubuntu_16.04_source_packages.container
|
||||
|
Loading…
Add table
Reference in a new issue