Skip to content

Commit f513d5a

Browse files
authored
Merge pull request #1149 from JohnMertz/patch-1
feat: specific error for socket permission
2 parents e15381b + 517d594 commit f513d5a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ function print_version {
1414
function check_docker_socket {
1515
if [[ $DOCKER_HOST == unix://* ]]; then
1616
socket_file=${DOCKER_HOST#unix://}
17+
if [[ ! -r $socket_file ]]; then
18+
echo "Error: Docker host socket at $socket_file is not readable. Please check user permissions" >&2
19+
echo "If you are in a SELinux environment, try using: '-v /var/run/docker.sock:$socket_file:z'" >&2
20+
exit 1
21+
fi
1722
if [[ ! -S $socket_file ]]; then
1823
echo "Error: you need to share your Docker host socket with a volume at $socket_file" >&2
1924
echo "Typically you should run your container with: '-v /var/run/docker.sock:$socket_file:ro'" >&2

0 commit comments

Comments
 (0)