2 Minutes to Liferay CE using Docker Desktop

Liferay Portal is an open-source portal framework for building web applications, websites, and portals. It also offers an integrated CMS and may serve as an enterprise integration platform.

Prerequisite

Download and install Docker Desktop…


This content originally appeared on DEV Community and was authored by Ajeet Singh Raina

Liferay Portal is an open-source portal framework for building web applications, websites, and portals. It also offers an integrated CMS and may serve as an enterprise integration platform.

Prerequisite

Writing a Compose file

Copy the following content and save it as docker-compose.yml file.

services:
  liferay:
    image: ibaiborodine/liferay-portal-ce
    environment:
      LIFERAY_SETUP_PERIOD_WIZARD_PERIOD_ENABLED: "false"
      LIFERAY_TERMS_PERIOD_OF_PERIOD_USE_PERIOD_REQUIRED: "false"
      LIFERAY_USERS_PERIOD_REMINDER_PERIOD_QUERIES_PERIOD_ENABLED: "false"
      LIFERAY_USERS_PERIOD_REMINDER_PERIOD_QUERIES_PERIOD_CUSTOM_PERIOD_QUESTION_PERIOD_ENABLED: "false"
    ports:
      - "80:8080"

Start the container

docker compose up -d

Wait till the time container gets started completely

[+] Building 0.0s (0/0)                                                                                                                docker:default
[+] Running 2/2
 ✔ Network root_default      Created                                                                                                             0.1s 
 ✔ Container root-liferay-1  Started                                                                                                             0.1s
root-liferay-1  | 26-Jul-2024 17:50:05.417 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1158] milliseconds
root-liferay-1  | Loading jar:file:/opt/liferay/tomcat-9.0.56/webapps/ROOT/WEB-INF/shielded-container-lib/portal-impl.jar!/system.properties
root-liferay-1  | Loading jar:file:/opt/liferay/tomcat-9.0.56/webapps/ROOT/WEB-INF/shielded-container-lib/portal-impl.jar!/portal.properties
root-liferay-1  | 2024-07-26 17:50:14.063 INFO  [main][PortalContextLoaderListener:123] JVM arguments: -Djava.util.logging.config.file=/opt/liferay/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms2560m -Xmx2560m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7 -Dignore.endorsed.dirs= -Dcatalina.base=/opt/liferay/tomcat -Dcatalina.home=/opt/liferay/tomcat -Djava.io.tmpdir=/opt/liferay/tomcat/temp
root-liferay-1  | 2024-07-26 17:52:07.567 WARN  [main][DialectDetector:82] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demonstration purposes. The database settings can be changed in portal-ext.properties.
root-liferay-1  | 2024-07-26 17:52:07.567 INFO  [main][DialectDetector:153] Using dialect com.liferay.portal.dao.orm.hibernate.HSQLDialect for HSQL Database Engine 2.3
root-liferay-1  | 2024-07-26 17:52:30.127 INFO  [main][ModuleFrameworkImpl:1237] Starting initial bundles
root-liferay-1  | 2024-07-26 17:52:35.106 INFO  [ModuleFramework-Static-Bundles-5][InterpolationConfigurationPlugin:109] Configured directory for secrets: /opt/liferay/osgi/configs
root-liferay-1  | 2024-07-26 17:52:46.689 INFO  [main][ModuleFrameworkImpl:1534] Started initial bundles
root-liferay-1  | 2024-07-26 17:52:46.690 INFO  [main][ModuleFrameworkImpl:1583] Starting dynamic bundles
root-liferay-1  | 2024-07-26 17:53:17.920 INFO  [main][ModuleFrameworkImpl:1605] Started dynamic bundles
root-liferay-1  | 2024-07-26 17:53:17.926 INFO  [main][ModuleFrameworkImpl:1612] Starting web bundles
root-liferay-1  | 2024-07-26 17:53:23.752 INFO  [main][ModuleFrameworkImpl:1666] Started web bundles
root-liferay-1  | 2024-07-26 17:53:23.753 INFO  [main][ModuleFrameworkImpl:253] Navigate to Control Panel > System > Gogo Shell and enter "lb" to see all bundles
root-liferay-1  | 2024-07-26 17:53:27.906 WARN  [main][SidecarManager:103] Liferay automatically starts a child process of Elasticsearch named sidecar for convenient development and demonstration purposes. Do NOT use sidecar in production. Refer to the documentation for details on the limitations of sidecar and instructions on configuring a remote Elasticsearch connection in the Control Panel.

Verify if container is up and running

docker compose ps
NAME             IMAGE                            COMMAND                  SERVICE   CREATED          STATUS          PORTS
root-liferay-1   ibaiborodine/liferay-portal-ce   "docker-entrypoint.s…"   liferay   11 minutes ago   Up 11 minutes   11311/tcp, 0.0.0.0:80->8080/tcp
[node1] (local) root@192.168.0.8 ~
$ 

Visit http://localhost:80

Image2

The default Liferay Portal configuration contains embedded Hypersonic database and Elasticsearch instances.


This content originally appeared on DEV Community and was authored by Ajeet Singh Raina


Print Share Comment Cite Upload Translate Updates
APA

Ajeet Singh Raina | Sciencx (2024-07-26T08:45:49+00:00) 2 Minutes to Liferay CE using Docker Desktop. Retrieved from https://www.scien.cx/2024/07/26/2-minutes-to-liferay-ce-using-docker-desktop/

MLA
" » 2 Minutes to Liferay CE using Docker Desktop." Ajeet Singh Raina | Sciencx - Friday July 26, 2024, https://www.scien.cx/2024/07/26/2-minutes-to-liferay-ce-using-docker-desktop/
HARVARD
Ajeet Singh Raina | Sciencx Friday July 26, 2024 » 2 Minutes to Liferay CE using Docker Desktop., viewed ,<https://www.scien.cx/2024/07/26/2-minutes-to-liferay-ce-using-docker-desktop/>
VANCOUVER
Ajeet Singh Raina | Sciencx - » 2 Minutes to Liferay CE using Docker Desktop. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/26/2-minutes-to-liferay-ce-using-docker-desktop/
CHICAGO
" » 2 Minutes to Liferay CE using Docker Desktop." Ajeet Singh Raina | Sciencx - Accessed . https://www.scien.cx/2024/07/26/2-minutes-to-liferay-ce-using-docker-desktop/
IEEE
" » 2 Minutes to Liferay CE using Docker Desktop." Ajeet Singh Raina | Sciencx [Online]. Available: https://www.scien.cx/2024/07/26/2-minutes-to-liferay-ce-using-docker-desktop/. [Accessed: ]
rf:citation
» 2 Minutes to Liferay CE using Docker Desktop | Ajeet Singh Raina | Sciencx | https://www.scien.cx/2024/07/26/2-minutes-to-liferay-ce-using-docker-desktop/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.