Creating a Liferay DXP Docker Container

To create a Liferay DXP Docker container in Liferay Workspace, complete the steps below.

  1. Choose the Docker image you need. This is configured in your workspace’s gradle.properties file by customizing this property:

    liferay.workspace.docker.image.liferay
    

    To find the possible property values you can set, see the official Liferay DXP Docker Hub’s Tags section (e.g., Liferay Portal Docker Tags). For example, if you want to base your container on the Liferay Portal 7.2 GA1 image, you would set this property:

    liferay.workspace.docker.image.liferay=liferay/portal:7.2.0-ga1
    
  2. Run the following command from your workspace’s root folder:

    ./gradlew createDockerContainer
    

This command creates a new container named [projectName]-liferayapp. A new build/docker folder is generated in your workspace. This folder is mounted into the container’s file system. This means files in workspace’s build/docker folder are also available in the container’s /etc/liferay folder.

Any projects in your workspace are automatically compiled and copied to the build/docker/deploy folder when the container is created; this means that when the container is started, all your projects are deployed to the container. All configurations are also applied to the container.

Once your container is created, you can configure it.

« Leveraging DockerConfiguring a Docker Container »
Was this article helpful?
1 out of 1 found this helpful