Commit 4cd44842 authored by Praetorius, Simon's avatar Praetorius, Simon

updated the start_docker script for mac compatibility

parent cd8d95c1
#!/bin/bash
AMDIS_IMAGE="mathiwr/amdis-1.1.dev:debian9"
HOME_DIR=${HOME} #/Volumes/home/${USER}
HOME_DIR="/Volumes/home/${USER}"
USER_ID="$(id -u)"
echo "-- pull docker image ${AMDIS_IMAGE}"
docker pull ${AMDIS_IMAGE}
......@@ -11,11 +12,11 @@ if [ ! -f Dockerfile.${USER} ]; then
FROM ${AMDIS_IMAGE}
USER root
RUN useradd --home-dir /mnt/home --uid ${UID} -U -M ${USER}
RUN useradd --home-dir /home/${USER} --uid ${USER_ID} -U -M ${USER}
USER ${USER}
ENV HOME /mnt/home
WORKDIR /mnt/home
ENV HOME /home/${USER}
WORKDIR /home/${USER}
EOF
echo "-- create new docker image for current user"
......@@ -23,11 +24,11 @@ EOF
fi
echo "-- run docker image and mount two directories into the container"
echo " 1. ${PWD} -> /mnt/amdis_workshop"
echo " 2. /Volumes/home/${USER} -> /mnt/home"
echo " 1. ${PWD} -> /amdis_workshop"
echo " 2. ${HOME_DIR} -> /home/${USER}"
docker run -it \
-v ${PWD}:/mnt/amdis_workshop \
-v ${HOME_DIR}:/mnt/home \
docker run -it --rm -u ${USER} \
-v ${PWD}:/amdis_workshop \
-v ${HOME_DIR}:/home/${USER} \
amdis-1.1.dev:${USER} bash
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment