Skip to content

Commit 2d99c6f

Browse files
authored
Merge pull request #303 from TomSweeneyRedHat/dev/tsweeney/uninfo2
Add better error for subuid/subgid with usernamespace 1.13.1-RHEL
2 parents 708c087 + f4b3e15 commit 2d99c6f

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

man/docker-login.1.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ docker-login - Log in to a Docker registry.
1414
# DESCRIPTION
1515
Log in to a Docker Registry located on the specified
1616
`SERVER`. You can specify a URL or a `hostname` for the `SERVER` value. If you
17-
do not specify a `SERVER`, the command uses Docker's public registry located at
18-
`https://registry-1.docker.io/` by default. To get a username/password for Docker's public registry, create an account on Docker Hub.
17+
do not specify a `SERVER`, the command uses the first value in the field 'registries'
18+
in the '[registries.search]' table in /etc/containers/registries.conf, and if
19+
not specified there, Docker's public registry located at `https://registry-1.docker.io/`.
20+
21+
To get a username/password for Docker's public registry, create an account on Docker Hub.
1922

2023
`docker login` requires user to use `sudo` or be `root`, except when:
2124

@@ -42,6 +45,10 @@ credentials. When you log in, the command stores encoded credentials in
4245

4346
# docker login localhost:8080
4447

48+
## Login to Docker Hub overriding /etc/containers/registries.conf
49+
50+
# docker login docker.io
51+
4552
# See also
4653
**docker-logout(1)** to log out from a Docker registry.
4754

@@ -51,3 +58,4 @@ based on docker.com source material and internal work.
5158
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
5259
April 2015, updated by Mary Anthony for v2 <mary@docker.com>
5360
November 2015, updated by Sally O'Malley <somalley@redhat.com>
61+
March 2018, updated by Tom Sweeney <tsweeney@redhat.com>

man/dockerd.8.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,13 @@ unix://[/path/to/socket] to use.
374374
Path to the userland proxy binary.
375375

376376
**--userns-remap**=*default*|*uid:gid*|*user:group*|*user*|*uid*
377-
Enable user namespaces for containers on the daemon. Specifying "default"
378-
will cause a new user and group to be created to handle UID and GID range
379-
remapping for the user namespace mappings used for contained processes.
380-
Specifying a user (or uid) and optionally a group (or gid) will cause the
377+
Enable user namespaces for containers on the daemon. Specifying
378+
a user (or uid) and optionally a group (or gid) will cause the
381379
daemon to lookup the user and group's subordinate ID ranges for use as the
382-
user namespace mappings for contained processes.
380+
user namespace mappings for contained processes. Specifying "default"
381+
will cause a "dockremap" user and group to be created if not already present.
382+
The "dockremap" user and group, or the specified uid, gid, user or group must
383+
be created in the subuid(5) and subgid(5) files prior to enablement.
383384

384385
# SIGNATURE VERIFICATION
385386

pkg/idtools/idtools.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ func CreateIDMappings(username, groupname string) ([]IDMap, []IDMap, error) {
121121
return nil, nil, err
122122
}
123123
if len(subuidRanges) == 0 {
124-
return nil, nil, fmt.Errorf("No subuid ranges found for user %q", username)
124+
return nil, nil, fmt.Errorf("No subuid ranges found for user %q in %s", username, subuidFileName)
125125
}
126126
if len(subgidRanges) == 0 {
127-
return nil, nil, fmt.Errorf("No subgid ranges found for group %q", groupname)
127+
return nil, nil, fmt.Errorf("No subgid ranges found for group %q in %s", groupname, subgidFileName)
128128
}
129129

130130
return createIDMap(subuidRanges), createIDMap(subgidRanges), nil

0 commit comments

Comments
 (0)