0% found this document useful (0 votes)
22 views9 pages

TASKING App Note Docker July2022

This application note provides a step-by-step guide on how to build and run a Windows Docker image using the TASKING VX-toolset for TriCore v6.3R1. It covers setting up Docker Desktop, creating a Dockerfile, building the Docker image locally, and pushing it to Docker Hub. The document emphasizes the use of floating licenses and includes commands for managing Docker images and containers.

Uploaded by

Victor Segura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

TASKING App Note Docker July2022

This application note provides a step-by-step guide on how to build and run a Windows Docker image using the TASKING VX-toolset for TriCore v6.3R1. It covers setting up Docker Desktop, creating a Dockerfile, building the Docker image locally, and pushing it to Docker Hub. The document emphasizes the use of floating licenses and includes commands for managing Docker images and containers.

Uploaded by

Victor Segura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

HOW TO BUILD AND RUN

A WINDOWS DOCKER IMAGE – USING


THE EXAMPLE OF TASKING VX-TOOLSET
FOR TRICORE V6.3R1

APPLICATION NOTE
APPLICATION
NOTE

HOW TO BUILD AND RUN A WINDOWS DOCKER IMAGE –


USING THE EXAMPLE OF TASKING VX-TOOLSET FOR TRICORE V6.3R1

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.

WHAT IS 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.

CREATE TASKING DOCKER IMAGE ON LOCAL DISK

Setting Up Docker Desktop application


1. D
 ownload the latest Dockers Desktop App and install it from:
https://www.docker.com/products/docker-desktop

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).

Prepare Docker file


For this App Note, let’s assume that TASKING VX-toolset TriCore v6.3r1 is placed at the following installation directory:
C:\Program Files\TASKING\TriCore v6.3r1

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

3. Save and Dockerfile.txt and close it.


4. Rename the Dockerfile.txt to Dockerfile
(Remove the extension .txt as Docker engine do not accept the .txt format)

Creating Docker Image Locally


1. O
 pen the Command Prompt(cmd.exe) at Tricore Installation Directory
and write the following command:
docker build -t tricore .
i.e.

www.tasking.com
APPLICATION
NOTE

2. This will in return create an image named as “tricore” with the tag “latest” (default) like:

Running the Docker Container


1. Click on the “Run” button (as indicated above) in-order to run the image.
2. Once the Docker image is running, click on the Command Line Interface (CLI)

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

CREATE A TASKING DOCKER IMAGE FOR DOCKER HUB REPOS

Building an Image for Docker Repositories


1. In order to push an image to docker repository on Docker Hub, first sign up for the Docker Hub
community and login at Docker Desktop App with your respective credentials. Create a repository
in Docker Hub. In this App Note we are going to refer username as taskingdocker and repository
as tricore_2022. Once the repository has been created, go to the local installation directory of
TASKING VX-toolset TriCore v6.3r1. For this App Note we consider that as:
C:\Program Files\TASKING\TriCore v6.3r1

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

Pushing an Image to Docker Repositories


1. O
 nce the image had been successfully built for the repository, it can be pushed
to repository with the following command
docker push [username]/[repository_name]:tagname
like:
docker push taskingdocker/tricore_2022:tricore

Figure 7: VX-Toolset for TriCore, New Library Source File dialog box

Pulling an Image from Docker Repositories


1. O
 nce the image had been successfully pushed in the repository, it can be pulled from the repository
with the following command
docker pull [username]/[repository_name]:tagname
like:
docker pull taskingdocker/tricore_2022:tricore

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

You might also like