Leveraging Docker

Docker has become increasingly popular in today’s development lifecycle, by providing an automated way to package software and its dependencies into a standardized unit that can be shared cross-platform. Read Docker’s extensive documentation to learn more.

Liferay provides Docker images for

You can pull Liferay’s Docker images from those resources and manage them yourself. Liferay Workspace, however, provides an easy way to integrate Docker development into your existing development workflow with preconfigured Gradle tasks.

The following Docker commands (Gradle-based) are available in Liferay Workspace:

buildDockerImageBuilds the Docker image with all modules/configurations deployed.
createDockerContainerCreates a Docker container from the Liferay DXP image and mounts the workspace’s /build/docker folder to the container’s /etc/liferay folder.
createDockerfileCreates a Dockerfile to build the Docker image.
dockerDeployDeploys the project to the container’s deploy folder by copying the project archive file to workspace’s build/docker/deploy folder. This command can also be executed from workspace’s root folder to deploy all projects and copy all Docker configurations (i.e., from the configs/common and configs/docker folders) to the container.
logsDockerContainerPrints the portal runtime’s logs. You can exit log tracking mode while maintaining a running container (e.g., [Ctrl|Command] + C).
pullDockerImagePulls the Docker image.
removeDockerContainerRemoves the container from Docker’s system.
startDockerContainerStarts the Docker container.
stopDockerContainerStops the Docker container.

In this section, you’ll learn how to

Continue on to learn more.

« Validating Modules Outside of WorkspaceCreating a Liferay DXP Docker Container »
Was this article helpful?
0 out of 0 found this helpful