Commit cd8d95c1 authored by Praetorius, Simon's avatar Praetorius, Simon

start script for docker added

parent 08093cc7
......@@ -66,8 +66,7 @@ All slides and source code, as well as exercise material can be found in a git r
```
# Get the repository
cd ~/Desktop
git clone https://gitlab.mn.tu-dresden.de/spraetor/amdis_workshop_16.git ...
... amdis_workshop
git clone https://gitlab.mn.tu-dresden.de/spraetor/amdis_workshop_16.git amdis_workshop
# Download the material
cd amdis_workshop
......@@ -171,8 +170,7 @@ Everything necessary is collected and composed in a docker image.
```
docker pull mathiwr/amdis-1.1.dev:debian9
docker run -it -v ~/Desktop/amdis_workshop:/amdis_workshop ...
... mathiwr/amdis-1.1.dev:debian9 bash
docker run -it -v ~/Desktop/amdis_workshop:/amdis_workshop mathiwr/amdis-1.1.dev:debian9 bash
```
</textarea>
......
#!/bin/bash
AMDIS_IMAGE="mathiwr/amdis-1.1.dev:debian9"
HOME_DIR=${HOME} #/Volumes/home/${USER}
echo "-- pull docker image ${AMDIS_IMAGE}"
docker pull ${AMDIS_IMAGE}
if [ ! -f Dockerfile.${USER} ]; then
cat >Dockerfile.${USER} << EOF
FROM ${AMDIS_IMAGE}
USER root
RUN useradd --home-dir /mnt/home --uid ${UID} -U -M ${USER}
USER ${USER}
ENV HOME /mnt/home
WORKDIR /mnt/home
EOF
echo "-- create new docker image for current user"
docker build -t amdis-1.1.dev:${USER} -f Dockerfile.${USER} .
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"
docker run -it \
-v ${PWD}:/mnt/amdis_workshop \
-v ${HOME_DIR}:/mnt/home \
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