Skip to content

Commit

Permalink
Setup instructions updated for pre-built container images
Browse files Browse the repository at this point in the history
  • Loading branch information
tsandmann committed May 30, 2021
1 parent c17c83c commit 6ed67ab
Showing 1 changed file with 38 additions and 12 deletions.
50 changes: 38 additions & 12 deletions installation/3_installation_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ Hat man eigenen Änderungen am Code vorgenommen, sollte man das Datenverzeichnis
wget https://github.com/tsandmann/ctbot-container/raw/master/run_eclipse.sh
chmod +x run_eclipse.sh
./run_eclipse.sh PATH_TO_DATADIR [VERSION]
# ./run_eclipse.sh . 2020-12
# ./run_eclipse.sh . 2021-03
```

Als `VERSION` kann auch `latest` verwendet werden, um die aktuellste Version zu starten:
```shell
./run_eclipse.sh . latest
```

```note
Expand All @@ -41,7 +46,7 @@ Wurde Eclipse (oder die Eclipse-Einstellungen) "kaputtgespielt", kann die ganze
wget https://github.com/tsandmann/ctbot-container/raw/master/run_eclipse-rpi.sh
chmod +x run_eclipse-rpi.sh
./run_eclipse-rpi.sh PATH_TO_DATADIR [VERSION]
# ./run_eclipse-rpi.sh . 2020-12
# ./run_eclipse-rpi.sh . latest
```

```note
Expand All @@ -63,6 +68,11 @@ chmod +x run_ctsim.sh
# ./run_ctsim.sh . 2.28
```

Als `VERSION` kann auch `latest` verwendet werden, um die aktuellste Version zu starten:
```shell
./run_ctsim.sh . latest
```

#### Entwicklungsversion

```shell
Expand All @@ -84,22 +94,27 @@ cd ctbot-data

```shell
./run_eclipse.sh PATH_TO_DATADIR [VERSION]
# ./run_eclipse.sh . 2020-12
# ./run_eclipse.sh . 2021-03
```

oder

```shell
./run_eclipse-rpi.sh PATH_TO_DATADIR [VERSION]
# ./run_eclipse-rpi.sh . 2020-12
# ./run_eclipse-rpi.sh . 2021-03
```

Als `VERSION` kann jeweils auch `latest` verwendet werden, um die aktuellste Version zu starten, also z.B.:
```shell
./run_eclipse.sh . latest
```

### Eclipse-Workspace bereinigen

Wurde Eclipse (oder die Eclipse-Einstellungen) "kaputtgespielt", kann die ganze Umgebung wieder auf die Ausgangswerte zurückgesetzt werden (im Normalbetrieb nicht erforderlich):

```warning
Alle eigenen Eclipse-Einstellungen werden dabei gelöscht!
Alle eigenen Eclipse-Einstellungen werden dabei gelöscht! Änderungen am Sourcecode der Projekte bleiben natürlich erhalten.
```

```shell
Expand All @@ -113,15 +128,20 @@ rm -rf .metadata
# ./run_ctsim.sh . 2.28
```

Als `VERSION` kann auch `latest` verwendet werden, um die aktuellste Version zu starten:
```shell
./run_ctsim.sh . latest
```

### Weitere Features für Fortgeschrittene

#### Eigene Parameter

Hängt man an das Start-Skript weitere Parameter an, werden diese direkt an den `run`-Aufruf des Containers weitergereicht. So lassen sich z.B. weitere Verzeichnisse in den Container mounten, Programmier- bzw. USB-2-Bot-Adapter im Container verfügbar machen oder Ports forwarden.

Beispiele:
* USB-2-Bot-Adapter verwenden: `./run_eclipse.sh . 2020-12 --device=/dev/ttyUSB0`
* ct-Sim-Port forwarden: `./run_eclipse.sh . 2020-12 -p 10001:10001`
* USB-2-Bot-Adapter verwenden: `./run_eclipse.sh . 2021-03 --device=/dev/ttyUSB0`
* ct-Sim-Port forwarden: `./run_eclipse.sh . 2021-03 -p 10001:10001`

#### Benutzer im Container

Expand All @@ -135,12 +155,18 @@ Die Start-Skripte starten die Container mit der Option `--rm`, so dass sie nach

```shell
podman pull IMAGE_REPO:VERSION
# podman pull tsandmann/ctbot-eclipse:2020-12
# podman pull docker.io/tsandmann/ctbot-eclipse:2021-03
```
oder
```shell
docker pull IMAGE_REPO:VERSION
# docker pull tsandmann/ctbot-eclipse:2020-12
# docker pull docker.io/tsandmann/ctbot-eclipse:2021-03
```

Um die neueste verfügbare Version zu laden:
```shell
podman pull IMAGE_REPO:latest
# podman pull docker.io/tsandmann/ctbot-eclipse:latest
```

### Alte Container-Images aufräumen
Expand All @@ -160,10 +186,10 @@ git clone https://github.com/tsandmann/ctbot-container.git
cd ctbot-container

./build_eclipse.sh VERSION
# ./build_eclipse.sh 2020-12
# ./build_eclipse.sh 2021-03

./build_eclipse-rpi.sh VERSION
# ./build_eclipse-rpi.sh 2020-12
# ./build_eclipse-rpi.sh 2021-03

./build_ctsim.sh VERSION
# ./build_ctsim.sh 2.28
Expand All @@ -182,4 +208,4 @@ cd ctbot-container
---

<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank"><img src="images/license.svg" alt="License: CC BY-SA 4.0" style="left;margin-left:0;margin-right:1em;" /></a><br>
Autor: <a href="https://github.com/tsandmann" target="_blank" style="color:#3c454e;">Timo Sandmann</a> \| Stand: 01.01.2021
Autor: <a href="https://github.com/tsandmann" target="_blank" style="color:#3c454e;">Timo Sandmann</a> \| Stand: 30.05.2021

0 comments on commit 6ed67ab

Please sign in to comment.