Add --no-log-init to the node user that gets created to avoid massive image sizes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nodejs/docker-node のほかの issue
-
alpine build process
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
nodejs/docker-node#2707 ·
メンテナーはふだん 1 日以内に返信
-
build process
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nodejs/docker-node#2671 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nodejs/docker-node#1707 · コメント 3 件 · リアクション 7 件 ·
メンテナーはふだん 1 日以内に返信
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nodejs/docker-node#1101 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
nodejs/docker-node#2698 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
nodejs/docker-node の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
meetecho/juturna_nodes#42 ·
メンテナーはふだん 2 日以内に返信
-
bug dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
nolte/claude-shared#822 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bluesky-social/social-app#12545 ·
メンテナーはふだん 1 日以内に返信
-
refactor topic-architecture topic-ui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
XCSoar/XCSoar#3547 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信