How to use Docker image of CAD Exchanger SDK

Since the release 3.22.0, we have offered Docker images, allowing developers to easily set up and run CAD Exchanger SDK in the preferred environment. Let’s see how to build a Docker image that you can use for running apps.

Olesia Lebedeva
Olesia Lebedeva
2 min read

What is Docker image and why is it useful?

Docker images are basically the building blocks of Docker containers. Each of them is a lightweight, standalone, executable software package that includes everything necessary to run an app.

The availability of Docker brings several benefits to developers:

  • It simplifies the development process. Developers can easily set up and configure the CAD Exchanger SDK environment using Docker, ensuring consistency across different machines and minimizing compatibility issues.
  • This tool provides developers with a portable and reproducible development environment. They can package their CAD Exchanger SDK applications along with all the necessary dependencies and configurations into a Docker image.
  • It enables efficient collaboration among developers. With Docker images, they can share their development environment easily, allowing for reducing the chances of environment-specific bugs or discrepancies.

Step-by-step instructions

To get started, you simply need to build the CAD Exchanger SDK Docker image. Once you have the image, you can run it as a container, and you're all set! Let’s see how to do this.

1. Set up Docker on your computer

Desktop version of Docker
Desktop version of Docker

The first step is to install this tool on your computer and create a DockerHub account (optionally). Head over to the Docker website and look for the version that matches your operating system. Download and install it. To start launching a Docker image, you just need to use a command line program like Terminal or Command Prompt.

2. Unzip the archive folder

File unpacking process

As soon as you contact our support team, they will send you an archive. Below, we will look at the instructions using Python as an example. The archive contains 3 important parts: 

  • ‘Data’ folder with testing file;
  • Dockerfile for building a Python testing application image;
  • ‘README’ instruction.

README file has all the necessary information and differs slightly, depending on your chosen language: C++, C#, Java, or Python.

3. Add your license file to the folder

To build the image successfully, you should first transfer a license file to the dockerfile folder. Otherwise, you will receive the following error message.

An error occurred during the creating a docker image without a license
An error occurred during the creating a docker image without a license

4. Launch the building image

For testing Python example, you need to specify the path to the folder with dockerfile and insert the following line to the console:

$ docker build --build-arg "PYTHON_VERSION=${PYTHON_VERSION}" -f compile-example-python.dockerfile -t compile-example-python .

Please note that you also should choose the desired programming language version: 3.7, 3.8, 3.9, 3.10, or 3.11.

Ready-to-use Docker image
Ready-to-use Docker image

Once the image is built, you can check it by running the following command:

$ docker images

If the image is completely ready, you will see information about it with a unique number.

Readiness check
Readiness check

To make sure that the image works correctly, you can do a sample run of the test model.

Sample run of the test model
Sample run of the test model

Now your Docker image is ready, and you can customize the container environment further to suit your specific requirements!

Summary

Docker images provide a pre-configured and ready-to-use setup for running CAD Exchanger SDK without the hassle of manual installation and configuration.

By utilizing the Docker images, you can easily set up your development or production environment. These images contain all the necessary dependencies and configurations, allowing you to focus on your CAD-related development tasks rather than dealing with setup complexities.

Olesia Lebedeva
Olesia Lebedeva
Content Manager

Get the CAD Exchanger Newsletter

From us to your inbox weekly.