Skip to content
Snippets Groups Projects
docker.sh 536 B
Newer Older
  • Learn to ignore specific revisions
  • Florian Fischer's avatar
    Florian Fischer committed
    #!/usr/bin/env bash
    
    # The directory of this script is also EMPER's root directory.
    EMPER_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
    
    IMAGE=$(sed --regexp-extended --quiet 's;^image: "([^"]*)"$;\1;p' "${EMPER_ROOT}/.gitlab-ci.yml")
    
    docker run \
    	   --volume="${EMPER_ROOT}:${EMPER_ROOT}" \
    	   --interactive \
    	   --tty \
    	   --env USER_ID="${UID}" \
    	   --env GROUP_ID="$(id -g ${USER})" \
    	   --security-opt=seccomp:unconfined \
    	   "${IMAGE}" \
    	   "${EMPER_ROOT}/tools/docker-prepare" "${EMPER_ROOT}" $@