Documentation

Installing Apps and Other Artifacts to Containers

Applications and other artifacts (such as DXP activation keys) are installed to DXP Docker containers via the container’s /mnt/liferay/deploy folder. The container entry point symbolically links the /mnt/liferay/deploy folder to the container’s [Liferay Home]/deploy folder (i.e., /opt/liferay/deploy). Any artifacts that you provide to the /mnt/liferay/deploy folder are auto-deployed to Liferay.

Here are two ways to install artifacts:

Note

A Docker volume can also be used to install artifacts to a container.

Installing Artifacts Using a Bind Mount

Here are the steps:

  1. Create a host folder and a subfolder called deploy.

    mkdir -p [host folder]/deploy
    
  2. Copy your artifact into the [host folder]/deploy folder. For example,

    cp my-app.lpkg [host folder]/deploy
    
  3. Create a container, that includes a bind mount that maps your artifact’s folder to the container’s /mnt/liferay/deploy folder. Since this example’s artifact is in a folder called deploy, you can bind mount to the container’s /mnt/liferay folder.

    docker run -it -m 8g -p 8080:8080 -v [host folder path]:/mnt/liferay liferay/dxp:[tag]
    

Liferay launches and installs the artifact. The container reports a message like this:

[LIFERAY] The directory /mnt/liferay/deploy is ready. Copy files to [host folder]/deploy on the host operating system to deploy modules to Liferay Portal at runtime.

Note

After Liferay launches, you can install additional artifacts to Liferay by copying them to your [host folder]/deploy folder.

Installing Artifacts Using docker cp

Use a docker cp command like this one to copy your artifact to your running container’s /mnt/liferay/deploy folder.

docker cp ~/my-apps/some-app.lpkg [container]:/opt/liferay/deploy

Now you know how to install apps and other artifacts to Liferay.