diff --git a/Dockerfile b/Dockerfile
index c70506c..c6ee901 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,7 @@ FROM alpine/git
 
 RUN apk add --no-cache curl
 
-ADD update /bin/update
+ADD ./update /usr/bin/update
 
 # Override ENTRYPOINT of alpine/git
 ENTRYPOINT /bin/sh
diff --git a/update b/update
index 6e3eda9..827b2e5 100755
--- a/update
+++ b/update
@@ -1,4 +1,4 @@
-#!/usr/bin/bash
+#!/bin/sh
 
 update() {
   url="$1"
@@ -30,13 +30,13 @@ update() {
   echo "\e[1;32mUpdated ${dst} from ${url}\e[0m"
 }
 
-if ! git rev-parse --is-inside-work-tree > /dev/null
+if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1
 then
-  echo -e "\e[1;31mNot a working directory\e[0m"
+  echo -e "\e[1;31mNot a git directory\e[0m"
   exit 1
 fi
 
-gitdir="$(realpath ${1:-$PWD})"
+gitdir="$(realpath "${1:-$PWD}")"
 while read -r pad
 do
   update "$pad"