Skip to content

Commit

Permalink
fix: useradd docker-client gid handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rcwbr committed Sep 22, 2024
1 parent a0c9eee commit bb8021f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ The useradd partial contains a devcontainer bake config file. See [Devcontainer
| Variable | Required | Default | Effect |
| --- | --- | --- | --- |
| `USER` | ✗ | `"root"` | See [useradd Dockerfile](#useradd-dockerfile-usage) |
| `EXTRA_GID_ARGS` | ✗ | `""` | See [useradd Dockerfile](#useradd-dockerfile-usage) |
| `EXTRA_GID_ARGS` | ✗ | `""` or `DOCKER_CLIENT_EXTRA_GID_ARGS` if defined | See [useradd Dockerfile](#useradd-dockerfile-usage) |
| `UID` | ✗ | `0` | Maps to `USER_UID`. See [useradd Dockerfile](#useradd-dockerfile-usage) |
| `GID` | ✗ | `${UID}` | Maps to `USER_GID`.See [useradd Dockerfile](#useradd-dockerfile-usage) |
Expand Down
4 changes: 2 additions & 2 deletions docker-client/devcontainer-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
variable "DOCKER_GID" {
default = "800"
}
// Set EXTRA_GID_ARGS to include a Docker group in case the useradd partial will be included
variable "EXTRA_GID_ARGS" {
// Define an extra GID arg with the Docker group ID in case the useradd partial will be included
variable "DOCKER_CLIENT_EXTRA_GID_ARGS" {
default = "--gid ${DOCKER_GID}"
}

Expand Down
2 changes: 1 addition & 1 deletion useradd/devcontainer-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "EXTRA_GID_ARGS" {
default = ""
default = try(DOCKER_CLIENT_EXTRA_GID_ARGS, "")
}
variable "USER" {
default = "root"
Expand Down

0 comments on commit bb8021f

Please sign in to comment.