Skip to content

Commit 73c1f98

Browse files
authored
Merge pull request #523 from ElsevierAlex/ENTELLECT-26971-docker-GID-fix
Set fixed Docker GID to avoid collisions with some groups
2 parents 6bf4bba + a9e86af commit 73c1f98

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

build/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"user": {
33
"user-id": 1001,
4-
"group-id": 121
4+
"group-id": 121,
5+
"docker-group-id": 500
56
},
67
"install": [
78
{

build/config.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ function group_id() {
1313
jq -r '.user."group-id"' "$(config_file)"
1414
}
1515

16+
function docker_group_id() {
17+
jq -r '.user."docker-group-id"' "$(config_file)"
18+
}
19+
1620
function apt_packages() {
1721
jq -r '.install[] | select(.source == "apt") | .packages[]' "$(config_file)" | paste -sd ' ' -
1822
}

build/install_base.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ install_essentials
5050
configure_sources
5151

5252
apt-get update
53+
# The docker group needs to run before installers
54+
groupadd -g "$(docker_group_id)" docker || :
5355
install_tools_apt
5456
install_tools
5557

goss_base.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,6 @@ group:
8787
runner:
8888
exists: true
8989
gid: 121
90+
docker:
91+
exists: true
92+
gid: 500

0 commit comments

Comments
 (0)