0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Alpine Linux】AlpineLinuxの基本コマンドメモ

Posted at

公式リファレンス

Alpine Linux package management

ash

bashじゃなくてash

パッケージマネージャー apk

yumやapt-getのAlpine版

apk add --no-cache

Alpineのバージョン3.3以降であれば、 --no-cache オプションを使うことで、キャッシュを削除してくれる。

以下の2つは同じ意味

$ apk update
$ apk add <packages>
$ rm -rf /var/cache/apk/*

$ apk add --no-cache <packages>

apk add --virtual NAME

パッケージをNAMEでひとまとめにして管理できる。

$ apk add --no-cache --virtual NAME \
  curl... && \
  less...
$ apk del NAME

参考

[Alpine Linux で軽量な Docker イメージを作る](Instead of adding all the packages to 'world', create a new virtual package with the listed dependencies and add that to 'world'; the actions of the command are easily reverted by deleting the virtual package)
Alpine LinuxベースでDockerイメージを作るときのapkのコマンドめも

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?