Set up Docker¶
Open settings
The settings are opened via the SETTINGS section and in Docker tab.
SD card and Docker setup¶
In the Docker Settings menu, enable the Docker Engine to install custom software containers.
Note
For the use of this function a Micro SD card is necessary, which remains permanently in the device.
You will see how full the SD card is. You can eject the SD card.
Enable and set up Docker¶
- Enable Docker on.
- Click Save.
The following dialog opens:
- Click FORMAT SD CARD.
A new window will open. - Enter the password (passphrase). The passphrase must consist of at least 8 characters.
-
Click Save.
Note
The SD card is formatted in this step and all previous data is deleted. Also, the data on the SD card will be encrypted so that it can only be used with a CMTK.
- Wait until the dialog closes.
After a short time, the OPEN PORTAINER button is activated. - Click OPEN PORTAINER.
The Portainer (management platform for the Docker containers) opens. Here you can install the first containers.
- Wait until the dialog closes.
Use Portainer and shared ports within the Docker environment¶
Note
The more advanced operation of Portainer and how you can access internal interfaces or the Rest API are described in detail at http://dev.cmtk.de. There you will also find a number of code examples.
You can access any shared internal interfaces within the Docker environment, such as MQTT, the influxDB internal database, or the Rest API. The interfaces are accessible at the following addresses and ports:
Service | Address | Port |
---|---|---|
MQTT | 172.16.0.2 | 1883 |
Rest API | 172.16.0.2 | 8080 |
influxDB | 172.16.0.2 | 8086 |
The following credentials are required to access the influxDB (read-only):
.
- User: CMTK
- Password: balluff
- Database: balluffCMTKDatabase
Note
In principle, all ports are enabled within the Docker environment. For external communication, only ports 49152-65535 are enabled. Therefore, an appropriate port mapping in Portainer is usually necessary.
Import SD card with Docker¶
You can also use an SD card set up with one CMTK with Docker in another CMTK. This allows you to easily replicate developed applications.
- Insert the copied SD card into the CMTK.
- Activate Docker on.
- Click Save.
The following dialog opens:
- Click CHANGE PASSWORD, and enter the password used to encrypt the SD card on the other CMTK.
. - Wait until the dialog closes.
After a short time, the OPEN Docker button is activated. Now you can use Docker as usual.
Expert setting and format SD card¶
Activate Expert Mode to carry out further settings for SD card management.
.
Here you can display or change the current passphrase or format the SD card again for operation in the CMTK.
Note
If you change the passphrase or format the SD card, important information on the SD card may be lost.