mirror of
https://git.netzspielplatz.de/docker-multiarch/jdownloader2-headless.git
synced 2025-11-08 17:19:32 +00:00
Fix case where UID and GID are passed and added a test for that case.
This commit is contained in:
parent
fcac3155a3
commit
2a98e037bb
6 changed files with 58 additions and 25 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
*\~
|
*\~
|
||||||
.\#*
|
.\#*
|
||||||
\#*\#
|
\#*\#
|
||||||
.config/
|
.config/
|
||||||
|
goss.yaml
|
||||||
|
|
@ -15,7 +15,12 @@ for image in "${images[@]}"; do
|
||||||
docker build -t $tag -f $image.Dockerfile .
|
docker build -t $tag -f $image.Dockerfile .
|
||||||
|
|
||||||
echo "Testing image"
|
echo "Testing image"
|
||||||
|
cp goss-default.yaml goss.yaml
|
||||||
dgoss run $tag
|
dgoss run $tag
|
||||||
|
|
||||||
|
echo "Testing again with UID and GID"
|
||||||
|
cp goss-uid-test.yaml goss.yaml
|
||||||
|
dgoss run -e UID=1001 -e GID=101 $tag
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Set defaults for uid and gid to not be root
|
# Set defaults for uid and gid to not be root
|
||||||
if [ -n $GID ]; then GID=100; fi
|
if [ -z $GID ]; then GID=100; fi
|
||||||
if [ -n $UID ]; then UID=1000; fi
|
if [ -z $UID ]; then UID=1000; fi
|
||||||
|
|
||||||
if [ "$GID" -ne "0" ]; then
|
if [ "$GID" -ne "0" ]; then
|
||||||
GROUP=jdownloader
|
GROUP=jdownloader
|
||||||
|
|
|
||||||
37
goss-default.yaml
Normal file
37
goss-default.yaml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
file:
|
||||||
|
/opt/JDownloader/JDownloader.jar:
|
||||||
|
exists: true
|
||||||
|
mode:
|
||||||
|
or:
|
||||||
|
- "0664"
|
||||||
|
- "0644"
|
||||||
|
filetype: file
|
||||||
|
contains: []
|
||||||
|
/opt/JDownloader/sevenzipjbinding1509.jar:
|
||||||
|
exists: true
|
||||||
|
mode:
|
||||||
|
or:
|
||||||
|
- "0664"
|
||||||
|
- "0644"
|
||||||
|
filetype: file
|
||||||
|
contains: []
|
||||||
|
/opt/JDownloader/sevenzipjbinding1509Linux.jar:
|
||||||
|
exists: true
|
||||||
|
mode:
|
||||||
|
or:
|
||||||
|
- "0664"
|
||||||
|
- "0644"
|
||||||
|
filetype: file
|
||||||
|
contains: []
|
||||||
|
package:
|
||||||
|
ffmpeg:
|
||||||
|
installed: true
|
||||||
|
user:
|
||||||
|
jdownloader:
|
||||||
|
exists: true
|
||||||
|
uid: 1000
|
||||||
|
gid: 100
|
||||||
|
groups:
|
||||||
|
- users
|
||||||
|
home: []
|
||||||
|
shell: /bin/false
|
||||||
9
goss-uid-test.yaml
Normal file
9
goss-uid-test.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
user:
|
||||||
|
jdownloader:
|
||||||
|
exists: true
|
||||||
|
uid: 1001
|
||||||
|
gid: 101
|
||||||
|
groups:
|
||||||
|
- jdownloader
|
||||||
|
home: []
|
||||||
|
shell: /bin/false
|
||||||
25
goss.yaml
25
goss.yaml
|
|
@ -1,28 +1,9 @@
|
||||||
file:
|
|
||||||
/opt/JDownloader/JDownloader.jar:
|
|
||||||
exists: true
|
|
||||||
mode: "0644"
|
|
||||||
filetype: file
|
|
||||||
contains: []
|
|
||||||
/opt/JDownloader/sevenzipjbinding1509.jar:
|
|
||||||
exists: true
|
|
||||||
mode: "0664"
|
|
||||||
filetype: file
|
|
||||||
contains: []
|
|
||||||
/opt/JDownloader/sevenzipjbinding1509Linux.jar:
|
|
||||||
exists: true
|
|
||||||
mode: "0664"
|
|
||||||
filetype: file
|
|
||||||
contains: []
|
|
||||||
package:
|
|
||||||
ffmpeg:
|
|
||||||
installed: true
|
|
||||||
user:
|
user:
|
||||||
jdownloader:
|
jdownloader:
|
||||||
exists: true
|
exists: true
|
||||||
uid: 1000
|
uid: 1001
|
||||||
gid: 100
|
gid: 101
|
||||||
groups:
|
groups:
|
||||||
- users
|
- jdownloader
|
||||||
home: []
|
home: []
|
||||||
shell: /bin/false
|
shell: /bin/false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue