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:
A Docker volume can also be used to install artifacts to a container.
Installing Artifacts Using a Bind Mount¶
Here are the steps:
Create a host folder and a subfolder called
mkdir -p [host folder]/deploy
Copy your artifact into the
[host folder]/deployfolder. For example,
cp my-app.lpkg [host folder]/deploy
Create a container, that includes a bind mount that maps your artifact’s folder to the container’s
/mnt/liferay/deployfolder. Since this example’s artifact is in a folder called
deploy, you can bind mount to the container’s
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:
After Liferay launches, you can install additional artifacts to Liferay by copying them to your
[host folder]/deploy folder.
Installing Artifacts Using
docker cp command like this one to copy your artifact to your running container’s
docker cp ~/my-apps/some-app.lpkg [container]:/opt/liferay/deploy
Now you know how to install apps and other artifacts to Liferay.