Add --no-log-init to the node user that gets created to avoid massive image sizes
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- docker, dockerfile
- 領域
- build-system, devops
調査の方向性
Docker イメージのビルド定義を検索し、issue に示されているコマンドから始めて、node ユーザーを作成するすべての useradd コマンドを見つけます。該当する各コマンドに要求されたオプションを追加し、その後、影響を受けるイメージをビルドして、報告された Hadolint の警告が解消されていることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Problem
Currently the node user is created with useradd --uid 1000 --gid node --shell /bin/bash --create-home node.
When customizing the UID / GID using build args with groupmod -g "${GID}" node && usermod -u "${UID}" -g "${GID}" node, some folks are reporting they are running out of disk space and can't build the image when they have a non-1000 UID on systems that create a lot of users.
Here's a comment going into more detail: https://github.com/nickjj/docker-flask-example/pull/7#issuecomment-1266698181
Also not using --no-log-init will cause Hadolint to throw this warning: -:44 DL3046 warning: useradd without flag -l and high UID will result in excessively large Image.
The usermod command doesn't support being able to set that option so it means our only option is to delete the node user and create a new one in which case life could be simplified by setting that flag here. You could make a case this is a bug report and not feature request due to the implications of not setting this flag when you create users in a Docker image.
Solution
Add --no-log-init to all of the useradd commands that create the node user.
- 主要言語
- Dockerfile
- スター
- 8.6k
- フォーク
- 2k
- 平均マージ
- 10時間 19分
- マージ済み PR(30日)
- 16
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nodejs/docker-node のほかの issue
-
build process docs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nodejs/docker-node#2564 · コメント 2 件 ·
-
build process
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nodejs/docker-node#2437 ·
-
build process
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
nodejs/docker-node#2436 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nodejs/docker-node#1707 · コメント 3 件 · リアクション 7 件 ·
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nodejs/docker-node#1101 · コメント 2 件 ·
nodejs/docker-node の issue をすべて見る
似ている issue
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
kubernetes-sigs/prow#953 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
out-of-date
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
CachyOS/CachyOS-PKGBUILDS#1894 ·
-
comp/dashboard P3 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
NousResearch/hermes-agent#117722 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
objectionary/jeo-maven-plugin#1760 ·