mkdir dtc-self-contained cd dtc-self-contained curl -Lo dtcw doctoolchain.org/dtcw chmod +x dtcw
When you work in a restricted environment where you don’t have direct access to the internet, you might need a self-contained version of docToolchain. A version which does not need to download dependencies but already has them on board.
If you have docker available, then this might already be the solution.
The docker image already contains all dependencies and the docToolchain wrapper (
dtcw) already checks if docker is available and running and thus will use docker in this case.
In order to fetch the docker image from your local docker proxy, please check the source of
dtcw and update the docker image reference.
If you don’t have Docker available, you need a local, self-contained install.
Start on an unrestricted system and download the docToolchain wrapper:
Check and install correct Java Development Kit (JDK)
We start with ensuring that we have the correct Java Development Kit (JDK) installed. Execute
./dtcw local getJava
to fetch and install the correct JDK.
It will be installed to
Start first tasks to install docToolchain locally
Now, let’s start a simple task to download and install docToolchain locally:
./dtcw local tasks
local will ensure that docker is ignored, even when docker is up and running.
tasks is a simple task which just shows all available tasks.
When you run this command, docToolchain will ask if it is allowed to install itself to
$HOME/.doctoolchain and if it should create a simple config file.
It will also fetch some first dependencies in order to execute the task.
These dependencies will be downloaded to
Fetch remaining dependencies
To fetch the remaining dependencies, execute
this will fetch the remaining dependencies and download them to
Get an offline gradle binary
The last needed step is to download an offline version of
gradle for docToolchain to use.
This was inspired by https://chengl.com/gradle-offline-build/.
gradlebinary-zip from https://services.gradle.org/distributions/
Place it in the folder
.doctoolchain/docToolchain-$VERSION/gradle/wrapper(replace $VERSION with current docToolchain version that you installed)
Go to folder
.doctoolchain/docToolchain-$VERSION/gradle/wrapperand open the file
distributionUrl=gradle-$GRADLEVERSION-bin.zip(replace $GRADLEVERSION with the version of the binary-zip you just downloaded)
docToolchain now uses an offline version of Gradle.
As a result, we now have docToolchain, a JDK, gradle and all dependencies installed to
You can now zip this folder and copy it to your restricted environment to the
The wrapper of your project will recognize it as local installation and use it.
|the installed JDK is for one specific PU architecture. So, if your team works with different Systems (Windows, Mac, Linux), you have to create several versions.|
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.