Alpine Linuxのインストール済みパッケージ

表題の件を知りたい。VirtualBoxで稼働させているものと、Dockerのコンテナで稼働させているものとで、どういうったパッケージの違いがあるのかを知る為に、インストール済みのパッケージ一覧を取得する方法を把握したい。

■ 環境

  • Alpine Linux 3.3.3
  • VirtualBox
  • Mac OSX El Capitan

■ apk

Alpine Linuxではパッケージ管理をするコマンドは`apk`なので、このヘルプを確認。

localhost:~# apk -h
apk-tools 2.6.5, compiled for x86_64.
   :
The following commands are available:
  add       Add PACKAGEs to 'world' and install (or upgrade) them, while ensuring that all dependencies are met
  del       Remove PACKAGEs from 'world' and uninstall them
  fix       Repair package or upgrade it without modifying main dependencies
  update    Update repository indexes from all remote repositories
  info      Give detailed information about PACKAGEs or repositores
  search    Search package by PATTERNs or by indexed dependencies
  upgrade   Upgrade currently installed packages to match repositories
  cache     Download missing PACKAGEs to cache and/or delete unneeded files from cache
  version   Compare package versions (in installed database vs. available) or do tests on literal version strings
  index     Create repository index file from FILEs
  fetch     Download PACKAGEs from global repositories to a local directory
  audit     Audit the directories for changes
  verify    Verify package integrity and signature
  dot       Generate graphviz graphs
  policy    Show repository policy for packages
  stats     Show statistics about repositories and installations
   :
localhost:~#

`info`と`stats`あたりを確認すれば良さそうな感じである。早速試す。

localhost:~# apk info
musl
acct
busybox
alpine-baselayout
openrc
alpine-conf
zlib
libcrypto1.0
libssl1.0
apk-tools
busybox-suid
busybox-initscripts
scanelf
musl-utils
libc-utils
alpine-keys
alpine-base
libattr
libcap
chrony
libuuid
libblkid
libcom_err
e2fsprogs-libs
e2fsprogs
lddtree
device-mapper
cryptsetup-libs
xz-libs
kmod
mkinitfs
linux-firmware
linux-grsec
openssh-client
openssh-sftp-server
openssh
mtools
blkid
syslinux
localhost:~#

39個のパッケージと思われる名称の一覧が取得できた。たぶんこれがパッケージ一覧で間違いはないであろう。`stats`も確認してみる。

localhost:~# apk stats
installed:
  packages: 39
  dirs: 882
  files: 4751
  bytes: 280416256
  triggers: 4
available:
  names: 8604
  packages: 5315
atoms:
  num: 4518
localhost:~#

installed“の”packages“が39なので前述のものと一致する。

ちなみにDockerで稼働しているAlpine Linuxのコンテナでも確認してみると下記の通り。

/ # apk stats
installed:
  packages: 11
  dirs: 70
  files: 62
  bytes: 5410816
  triggers: 1
available:
  names: 19
  packages: 11
atoms:
  num: 37
/ #
/ # apk info
musl
busybox
alpine-baselayout
alpine-keys
zlib
libcrypto1.0
libssl1.0
apk-tools
scanelf
musl-utils
libc-utils
/ #

Dockerのコンテナでは随分とパッケージ数が少ない。

以上。

■ 関連

コメントを残す

メールアドレスが公開されることはありません。

CAPTCHA


このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください