Follow the installation guide for docker: (https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)
Add the current user to the docker group:
sudo usermod -aG docker $USER
Follow the installation guide for VS Code: (https://code.visualstudio.com/docs/setup/linux)
As this repository uses git submodules, use the following to clone it.
git clone https://github.com/mniedermaier/CybICS.git --recursive
If you have already cloned it without the --recursive
flag, you can do this to also get the submodules afterwards:
git submodule update --init --recursive
Change to the git root folder:
cd CybICS
Run VS Code in the root of the repository:
code .
Install the dev container plugin:
Reopen the repository in dev container (be sure you have added the current user to the docker group):
If an error occurred on the initial setup, try to reload. The initial build of the dev container will take several minutes depending on your Internet connection and compute performance.
With the help of the Raspberry Pi Imager, the basic linux installation on the SD card can be done. The software can b e download for Windows, macOS, and Linux from the Raspberry Pi homepage (https://www.raspberrypi.com/software/). After installation start the rpi-imager software.
Click on "CHOOSE DEVICE" and select "No filtering".
Click on "CHOOSE OS" → "Raspberry Pi OS (other)" and select "Raspberry Pi OS Lite (64-bit)".
Click on "CHOOSE STORAGE" and select the SD card, where the image should be installed.
Click NEXT and select "EDIT SETTINGS":
Edit the options for image customization:
- Set hostname to "CybICS".
- Set username and password
- Username: pi
- Password: raspberry
- Configure wireless LAN
- SSID: "your SSID"
- Password: "your password"
- Configure local settings
Write the changes to the SD card.
The .dev.env in the root folder of the repository needs to be configured properly with the IP and user name of the Raspberry Pi.
The dev container needs to be "software". To switch dev conainters press "Ctrl+Shift+P" and select "Dev Conainters: Switch Container". Open a new terminal in VS Code with "Ctrl+Shift+`"
Change to the software folder
cd software/
Execute the installation script:
./installRPI.sh
The initial build of all containers takes up to one hour. During the installation, it is necessary to type in the password of the Raspberry Pi.
Start the container and execute the installation script.
cd CybICS
docker compose -f .devcontainer/raspberry/docker-compose.yml up -d --build
docker compose -f .devcontainer/raspberry/docker-compose.yml exec dev /CybICS/software/installRPI.sh
Optional: Remove the installation container.
docker compose -f .devcontainer/raspberry/docker-compose.yml down
Unfold
List container:
sudo docker ps -a
Start terminal within container:
sudo docker exec -it <mycontainer_name> bash
Copy file from docker container:
sudo docker cp <container_name>:<path_to_copy> <output_dir>
Get log from a container:
sudo docker logs --follow <mycontainer_name>