Contact Us Blog Register Login
PreEmptive -
  • Home
  • Products
    • Application Protection
      • Dotfuscator for .NET
        • Overview
        • Features
        • Compare Editions
        • Xamarin Protection
        • Videos & Resources
        • Pricing
        • Downloads
      • DashO for Android & Java
        • Overview
        • Features
        • Videos & Resources
        • Pricing
        • Downloads
      • JSDefender for JavaScript
        • Overview
        • Features
        • Online Demo
        • Pricing
        • Downloads
      • PreEmptive Protection for iOS
        • Overview
  • Support
    • Product Support
      • Dotfuscator for .NET
      • DashO for Android & Java
      • JSDefender for JavaScript
      • PreEmptive Protection for iOS
    • Resources
      • White Papers
      • Glossary
      • Videos
  • Solutions
    • App Protection Solutions
      • Mobile App Protection
      • Desktop & Server App Protection
      • General Data Protection Regulation (GDPR)
      • Security Development Lifecycle
      • Application Integrity Protection
      • Mobile RASP
      • PCI Mobile Payment Acceptance Security
  • Company
    • About
      • Why PreEmptive?
      • About Us
      • Careers
      • Blog
    • Contact
    • Legal

Dockerize PreEmptive's Products using Floating License

September 23, 2020 1029 Views Matt Insko



Customers occasionally ask us about adding DashO, Dotfuscator, or JSDefender to their Docker-based build processes. We do not provide pre-built Docker containers for our products, but it is relatively straightforward to create your own containers with the distributions we do provide. Historically, setting up licensing for these containers could be a challenge, but with the recent addition of Floating license support to DashO, Dotfuscator, and JSDefender, even the licensing part is straightforward.

This blog provides example Dockerfiles for each product, as a starting point for building your own containers. You will need to replace {x.y[.z]} with the appropriate major.minor[.patch] version.

Note: Floating licenses require network access. If you need your containers to work offline, contact us for special instructions.

DashO

Here is a sample Dockerfile for DashO:

FROM adoptopenjdk:11.0.8_10-jdk-hotspot

ARG DASHO_BASE="/opt/PreEmptive_Protection_DashO_{x.y}"

ENV DASHO_HOME="${DASHO_BASE}/app"\
    JDK_HOME="/opt/java/openjdk"

# Extract the installer
ADD PreEmptive_Protection_DashO_{x.y.z}.tar.gz $DASHO_BASE

# Link the extracted directory to the standard installation location.
RUN ln -s $DASHO_BASE/PreEmptive\ Protection\ DashO\ {x.y} $DASHO_HOME

# Set up to run the command line interface
ENTRYPOINT ["/opt/PreEmptive_Protection_DashO_{x.y}/app/dashocmd"]

Note: The image has DashO installed to a standard location and also sets DASHO_HOME in the environment. This is helpful if the container will be using the Gradle or Ant integration.

To build this image:

  1. Download the PreEmptive_Protection_DashO_{x.y.z}.tar.gz archive from PreEmptive.
  2. Place PreEmptive_Protection_DashO_{x.y.z}.tar.gz in the same directory as Dockerfile (listed above).
  3. Run docker build -t preemptive/dasho:{x.y.z} {path to the directory containing 'Dockerfile'}.

Running the DashO container is simple, you just need to pass the license information. This can either be mirrored from the current environment:

docker run --rm -e DASHO_LICENSE -v {projectPath}:/code preemptive/dasho:{x.y.z} /code/project.dox

set in the container's environment:

docker run --rm -e DASHO_LICENSE={LicenseString} -v {projectPath}:/code preemptive/dasho:{x.y.z} /code/project.dox

or passed via the command line:

docker run --rm -v {projectPath}:/code preemptive/dasho:{x.y.z} --license {LicenseString} /code/project.dox

Additional arguments can be found here.

Note: The {projectPath}, provided to the Docker container as a volume, is the path which contains all the files (input, output, etc.) referenced in the DashO configuration file, project.dox.

Dotfuscator

Here is a sample Dockerfile for Dotfuscator:

FROM mcr.microsoft.com/dotnet/core/sdk:2.1

# Copy Dotfuscator to the image

COPY PreEmptive.Protection.Dotfuscator.Pro.{x.y.z}.nupkg .

# Install zip and extract Dotfuscator
RUN apt-get update \
    && apt-get install -y zip \
    && mkdir -p /opt/local/PreEmptive.Protection.Dotfuscator.Pro \
    && unzip PreEmptive.Protection.Dotfuscator.Pro.{x.y.z}.nupkg -d /opt/local/PreEmptive.Protection.Dotfuscator.Pro

# Set up to run the command line interface
ENTRYPOINT ["dotnet", "/opt/local/PreEmptive.Protection.Dotfuscator.Pro/tools/programdir/netcore/dotfuscator.dll"]

To build this image:

  1. Download the PreEmptive.Protection.Dotfuscator.Pro.{x.y.z}.nupkg package from PreEmptive.
  2. Place PreEmptive.Protection.Dotfuscator.Pro.{x.y.z}.nupkg in the same directory as Dockerfile (listed above).
  3. Run docker build -t preemptive/dotfuscator:{x.y.z} {path to the directory containing 'Dockerfile'}.

The Dotfuscator container is run in a similar fashion to DashO except the environment variable is DOTFUSCATOR_LICENSE and the command line argument is /license:<license-string>. Additional arguments can be found here.

JSDefender

Here is a sample Dockerfile for JSDefender:

FROM node:12.16.1

# Copy and install JSDefender
COPY preemptive-jsdefender-*-{x.y.z}.tgz ./
RUN npm install -g preemptive-jsdefender-*-{x.y.z}.tgz --save-dev

# Set up to run the command line interface
ENTRYPOINT ["jsdefender"]

To build this image:

  1. Download the JSDefender packages (e.g. preemptive-jsdefender-core-{x.y.z}.tgz, preemptive-jsdefender-cli-{x.y.z}.tgz, etc) from PreEmptive.
  2. Place them in the same directory as Dockerfile (listed above).
  3. Run docker build -t preemptive/jsdefender:{x.y.z} {path to the directory containing 'Dockerfile'}.

The JSDefender container is run in a similar fashion to DashO except the environment variable is JSDEFENDER_LICENSE. Additional arguments can be found here.

Please Provide Feedback

Containerization is an essential part of modern software development practices, and as part of our ongoing efforts to lower the costs of protecting your code, we've made it easy for you to use our products in these scenarios. Please let us know how it works for you!


Tweet
Share

Categories

  • Dotfuscator

  • Dotfuscator CE

  • DashO

  • JSDefender

  • Press Releases

  • Mobile Protection

  • Risk Management

  • Support Corner

Latest Blog Posts

Protecting Java applications that use Jackson for JSON



JSON is a standard format for sharing objects and data within an application. When working in Java, there is no built-in support for JSON processing. There are, however, several widely-used libraries and options to choose from. In this article, we will focus on Jackson, which is one of the most popular.

Read more

Protecting C# applications that use AutoMapper



AutoMapper is an object-to-object mapping system used by many of our customers. It aims to simplify and organize code responsible for sharing instance values from an object of one type to an object of a different type.

Read more

Inventa, Wireless Technology Company, Protects their Android Application with DashO



Inventa, a Wireless Technology Company, Protects their Android Application with DashO

The Beginnings of Inventa

Having worked in the wireless mobile technology domain in the US, Anand Virani, became intrigued by the growing tech and wireless trends and wanted to explore the field more for himself. He noticed a boom in the Internet of Things (IoT) and that smartphones were becoming more central to how people interacted with each other at home, in the office, and in public places. What if there was a way phones could connect with each other without the need for Internet or cloud access? Smartphones were the future and Virani was determined to make a profitable business model based on this new trend.

Read more

Surgical Theater Protects their Medical Applications with Dotfuscator



Surgical Theater Protects their Medical Applications with Dotfuscator

How It All Started

How is flying a fighter plane similar to performing neurosurgery? They have more in common than you’d think. In 2005, Monty Avisar and Alon Geri, two Israeli fighter pilots were assigned to work with Lockheed Martin to build a $50 million F-16 Flight Simulator program for the Israeli Air Force to improve hand-eye coordination skills for their pilots during combat. Avisar took on the role of project manager and Geri served as senior engineer; the project was a success.

Four years later in 2009, the two finished their military service in Israel and moved to Cleveland, Ohio. Their experience working in virtual reality applications inspired them to wonder where this technology could also be applied. With several connections to surgeons, the two came to understand the ins and outs of operation procedures; in a similar way, surgeons were also working on a battlefield. What if surgeons could also train like fighter pilots and preview their surgical procedure, much like a fighter pilot could pre-fly their mission? The surgeons could pre-plan the operation from every angle and every approach to increase their situational awareness. And a year later, Surgical Theater was born.

Read more

Integrating DashO into a Maven Build



Maven is perhaps the most widely-used project management tool for Java. Based on the Project Object Model (POM), it is used not only for compilation of source code, but also dependency management, documentation, running tests, packaging, deployment, and more. We are frequently asked if we have a Maven plugin for running DashO. Though we do not offer a specific Maven plugin, adding DashO to your Maven-based project is surprisingly easy by leveraging Ant.

Read more

preemptive logo

767 Beta Dr. Suite A
Mayfield Village, OH 44143

Tel: +1 440.443.7200

solutions@preemptive.com

Latest Blog Posts

Protecting Java applications that use Jackson for JSON

December 30, 2020
Read more

Protecting C# applications that use AutoMapper

November 18, 2020
Read more

Inventa, Wireless Technology Company, Protects their Android Application with DashO

November 10, 2020
Read more

Surgical Theater Protects their Medical Applications with Dotfuscator

October 30, 2020
Read more

GlobalMed Finds Success by Switching to JSDefender

October 21, 2020
Read more

Twitter

@baldbeardbuild @GirlsWhoCode @baldbeardbuild thanks so much for inspiring us to be BUILDERS in our own community!… https://t.co/U6AyqPDhsa Jan 14 • reply • retweet • favorite

Copyright © 2020 PreEmptive

  • Home
  • Contact Support
  • Blog
  • Contact
Scroll to Top

PreEmptive uses cookies to improve the functionality of our website. By using this site, you agree to the use of cookies.