TASKING App Note Docker July2022
TASKING App Note Docker July2022
APPLICATION NOTE
APPLICATION
NOTE
INTRODUCTION
In this Application Note, we will explain how to Build and run Windows Docker Image for a TASKING product on Local Disk
and Remote Repository. We will take the product “TASKING VX-toolset for TriCore v6.3r1” with a floating license as an example.
Node-locked licenses are not recommended to be used for a Docker image.
A Docker image is a read-only template that contains a set of instructions for creating a container that can run on a Docker
platform. It provides a convenient way to package up applications and preconfigured server environments, which you can
use for your own private use or share publicly with other Docker users. For more information about Docker, please refer to
https://www.docker.com.
For this Application Note Docker Desktop 4.5.1 (74721) will be used.
2. L
aunch the Docker Desktop app. Once Docker Engine had started successful it will look
like this (Docker Icon turn to Green):
www.tasking.com
APPLICATION
NOTE
3. Make sure to “Switch to Window Containers…” via right clicking on the Docker icon present
in “Show Hidden Icons” from Windows task bar:
If you are creating an image for Linux OS leave it to Linux Container (this is the default).
1. C
reate a new text file(.txt) file at the installation directory of v6.3r1.
For now, we will refer this .txt file as “Dockerfile.txt”.
2. Place
the following text in Dockerfile:
# Getting base image Windows
FROM mcr.microsoft.com/windows/servercore:ltsc2019
RUN echo „Making a New Directory Called Tricore“
RUN mkdir Tricore
RUN echo „Now Adding Folders“
ADD . /Tricore
# Setting the Required Environment Variable
ENV TSK_OPTIONS_FILE_SW160800v6_3r1 „C:\Tricore\etc\licopt.txt“
# Sets a command or process that will run each time a container is
# run from the new image.
CMD [ „cmd“ ]
www.tasking.com
APPLICATION
NOTE
www.tasking.com
APPLICATION
NOTE
2. This will in return create an image named as “tricore” with the tag “latest” (default) like:
www.tasking.com
APPLICATION
NOTE
3. Once the command line interface is open, change the working directory to
\Tricore\ctc\bin and run the “ctc -V” command as indicated below:
Remark: During the preparation of Dockerfile, we had introduced a layer to create a new folder
named “Tricore” in the Docker container (RUN mkdir Tricore).
After that we have copied (ADD . /Tricore) the full content of the root installation folder
(C:\Program Files\TASKING\TriCore v6.3r1) to this newly created folder Tricore (C:\Tricore).
4. T
his will show the current version number of Tricore being used in the Docker image which proofs
that the Tricore image has been created successfully
www.tasking.com
APPLICATION
NOTE
2. Add the Docker file as mentioned in previous Chapter (please refer to Prepare Docker file).
Open the command prompt(cmd.exe) here and use the following command to build an image
for repository.
docker build -t [username]/[repository_name]:image_tag .
like:
docker build -t taskingdocker/tricore_2022:tricore .
www.tasking.com
APPLICATION
NOTE
Figure 7: VX-Toolset for TriCore, New Library Source File dialog box
www.tasking.com
APPLICATION
NOTE
The information about successful pushing and pulling can be verified in the Docker Desktop App
and also in the Docker Hub repository. i.e.
www.tasking.com