Building in Docker
To build your application in Docker, run this:
cartridge pack --use-docker
You might want to perform application build in Docker if your distributable is intended for a system different than the one you use.
In this case,
tarantoolctl rocks make,
cartridge.post-build run inside a Docker image
that has a volume mapped onto the build directory.
As a result, the build directory will contain Linux-specific application files
and rock modules.
If you want to package a distribution on your local machine without using Docker, check the packaging overview.
||Path to the base Dockerfile of the build image.
||Images that work as cache sources for both build and runtime images.
Path to the SDK to be delivered in the final artifact.
Alternatively, you can pass the path via the
||Enterprise only. Deliver the SDK from the local machine in the final artifact.|
If you’re building a Tarantool Enterprise application in Docker,
make sure you specify the path to the SDK you want to include in the image.
Do that using the
or the environment variable
TARANTOOL_SDK_PATH, which has lower priority.
To specify the currently activated SDK, pass the
The image where the package is built will be referred to as the build image. It has the following structure:
- Base image:
- Pre-installed packages:
unzip. These are the packages required for building the default
- The image includes a version of Tarantool:
- If you use open-source Tarantool, the image contains the same version you’ve used for local development.
- If you use Tarantool Enterprise, the SDK with Tarantool Enterprise binaries
is copied to the image.
To customize your build image, use the
in the application root directory.
By default, the build image is based on
unzip packages are installed in that image.
If your application requires other packages for building, you
can specify more base layers for the build image.
To do that, place the file
Dockerfile.build.cartridge in your application root directory
or pass a path to another Dockerfile with the
Make sure your Dockerfile starts with the line
FROM centos:7 (except comments).
For example, if your application build requires
customize the Dockerfile as follows:
FROM centos:7 RUN yum install -y gcc-c++ # Note that git, gcc, make, cmake, and unzip # will be installed anyway
unzip will be installed
anyway on the next layer.