File tree 5 files changed +15
-10
lines changed
5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- if [ " $1 " = ' redis-server' ]; then
4
+ # allow the container to be started with `--user`
5
+ if [ " $1 " = ' redis-server' -a " $( id -u) " = ' 0' ]; then
5
6
chown -R redis .
6
- exec gosu redis " $@ "
7
+ exec gosu redis " $BASH_SOURCE " " $ @"
7
8
fi
8
9
9
10
exec " $@ "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- if [ " $1 " = ' redis-server' ]; then
4
+ # allow the container to be started with `--user`
5
+ if [ " $1 " = ' redis-server' -a " $( id -u) " = ' 0' ]; then
5
6
chown -R redis .
6
- exec gosu redis " $@ "
7
+ exec gosu redis " $BASH_SOURCE " " $ @"
7
8
fi
8
9
9
10
exec " $@ "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- if [ " $1 " = ' redis-server' ]; then
4
+ # allow the container to be started with `--user`
5
+ if [ " $1 " = ' redis-server' -a " $( id -u) " = ' 0' ]; then
5
6
chown -R redis .
6
- exec gosu redis " $@ "
7
+ exec gosu redis " $BASH_SOURCE " " $ @"
7
8
fi
8
9
9
10
exec " $@ "
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
set -e
3
3
4
- if [ " $1 " = ' redis-server' ]; then
4
+ # allow the container to be started with `--user`
5
+ if [ " $1 " = ' redis-server' -a " $( id -u) " = ' 0' ]; then
5
6
chown -R redis .
6
- exec gosu redis " $@ "
7
+ exec gosu redis " $0 " " $ @"
7
8
fi
8
9
9
10
exec " $@ "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- if [ " $1 " = ' redis-server' ]; then
4
+ # allow the container to be started with `--user`
5
+ if [ " $1 " = ' redis-server' -a " $( id -u) " = ' 0' ]; then
5
6
chown -R redis .
6
- exec gosu redis " $@ "
7
+ exec gosu redis " $BASH_SOURCE " " $ @"
7
8
fi
8
9
9
10
exec " $@ "
You can’t perform that action at this time.
0 commit comments