Container-Management & Lizenzierung?
Verwalten Sie Docker-Container mit Portainer oder der CLI, um sie aufzulisten, zu starten/stoppen, zu inspizieren, Protokolle anzuzeigen und interaktive Shells zu öffnen. Starten Sie einen WinCC OA OA-Container, indem Sie das Image auswählen, die erforderlichen Ports (z. B. 8443) zuordnen, Umgebungsvariablen für das Projekt und den Lizenzserver festlegen und Volumes verwenden, um Daten über Neustarts hinweg beizubehalten. Wenn der Lizenzserver mehrere Container hostet, legen Sie die UCM-Container-Seriennummer in der Projektkonfiguration fest, um eine gültige Lizenz sicherzustellen.
Video Information
- Length
- 5:15
- Language
- English
Transcript
Welcome back. How can we manage containers and how to start a WinCC OA OA container with our license?
In the graphical interface, you can see a list of running containers. Each container can be controlled, inspected, or accessed remotely via a terminal session.
In Portainer accessible via a browser, we can view the available images and running containers. For example, we can see the active Portainer container.
Containers can be started or stopped directly from this interface. Using the inspect function, we can view configuration options and startup parameters for the container such as the web server network ports that are exposed to allow external access to the Portainer graphical user interface.
The logs action display the container's standard output and standard error. Additionally, we can open a terminal session to interact with the container directly.
- The
docker runcommand is used to start container and several options can be added.-
Druns the container in detached mode in the background. RMautomatically removes the container once it stops.Nameallows you to assign a meaningful name to the container.
-
Paps network ports specifying which ports on the host should be forwarded to which ports inside the container. You need to pass star parameters.
Finally, you specify the image name to launch.
For example, starting a docker with a WinCC OA demo application.
This command will now start a container from the WinCC OA 3.20 patch 4 image.
Using the OA project environment variable, we define that the demo application should be run. To access the demo application via web client, we need to expose the necessary network ports.
By using the minus P option, we can forward the container's internal
port 8443 to the host port 8443, enabling web access to the application.
Docker pslists all currently running containers.Docker inspectshows detail configuration and settings of a specific container.Docker logs flets you follow the container standard output and error streams in real time.Docker exec. It allows you to connect to a running container, for example, to open an interactive bash shell.Docker stopstops a running container.- The command
docker ps nowshows that we have started a container named demo from the WinCC OA image.
- Using
docker exec - <its container name>. We can run a process inside the container such as opening a bash shell. - With the
exitcommand, we leave the bash session of the container. In general, data of the docker containers is not persistent. Restarting a container may result in the loss of settings and data. - Volumes or external directories can be mounted via
volume option -vinto a docker container.We are now starting a container using the demo application for my Windows host mounted via volume. Any changes made in the application such as values or user settings will now be persistent because they are stored outside the container on my host machine.
We are now creating a new user and assigning it to the user group para. Of course, these changes should be persistent to ensure that the new user can log into the application after a restart.Let's restart the container. I'm doing this without using detached mode so we can view the logs and know when the application is fully started.
Log into the client with a new user. So the changes we made are still there. Docker images themselves do not contain any licenses.However, our WinCC OA image supports the use of an environment variable called licenses.
This allows you to specify the IP address or host name of your license server, enabling the container to connect to it at runtime. If your defined license server hosts multiple license containers for different purposes, you must specify the appropriate container in the WinCC OA project config file with the entry UCM container serial number.As a result, the license warning is no longer displayed and the application now runs with a valid license.
