Defining Template Customization in Dockerfile

The simplest way to prepare your custom stack is to compose a Dockerfile, where the appropriate Jelastic-managed template is set as a base image, and implement customization on its top.

Tip: Further development of this approach implies possibility to prepare own dockerized stack templates considering the required Jelastic Platform integration specifics - the appropriate guidance will be provided separately.
1. So, go to the Project tab, click the + button and select the New file option from the appeared list.


2. Within the opened page, specify Dockerfile as a name for this file.

create dockerfile

Next, in the editor area, add file content according to the following structure:

FROM jelastic/{image}:{tag}
  • {image} - name of the image from jelastic repository you’d like to use as a base for your stack template
  • {tag} - required tag version of the specified template (the full list of available ones can be found by switching to the Tags tab within the appropriate repo details at DockerHub)
  • {custom_modifications} - your code to implement necessary customizations; should be specified with Dockerfile syntax (in our example, we’ve defined to automatically create a hello.txt file in the root folder of each corresponding container)

Optionally, specify a descriptive Commit message and choose Target branch to Commit Changes.

After implementing all the required modifications in Dockerfile, configure CI/CD for customized template to be automatically updated upon new commits.