Public | Automated Build

Last pushed: 10 months ago
Short Description
Short description is empty for this repo.
Full Description

Docker image for liferay 6.2

The image is build in docker registry :
you can pull it :

docker pull snasello/liferay-6.2:6.2-ce-ga6

Start image

you can start it directly, it will use the hsqldb (not for production!)

docker run --rm -t -i -p 8080:8080 snasello/liferay-6.2:6.2-ce-ga6

When you have the message "INFO: Server startup in xxx ms" you can open a browser and go to http://localhost:8080 (with boot2docker you must specify the ip, you can found it with # boot2docker ip)

Link with Database

Acutally you can link it with mysql or postgresql but it is easy to add one.


First start the mysql image

docker run --name lep-mysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -e MYSQL_USER=lportal -e MYSQL_PASSWORD=lportal -e MYSQL_DATABASE=lportal -d mysql:5.6

Then start the liferay image with a link to the database

docker run --rm -it -p 8080:8080 --link lep-mysql:db_lep -e DB_TYPE=MYSQL snasello/liferay-6.2:6.2-ce-ga6


First start the PostgreSQL image

docker run --name lep-postgresql -d postgres:9.3

Then create database and user :

docker run -it --link lep-postgresql:postgres --rm postgres:9.3 sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'

postgres=# CREATE USER lportal WITH PASSWORD 'lportal';
postgres=# GRANT ALL PRIVILEGES ON DATABASE lportal to lportal;
postgres=# \q

And start the liferay image with a link to the database

docker run --rm -it -p 8080:8080 --link lep-postgresql:db_lep -e DB_TYPE=POSTGRESQL snasello/liferay-6.2:6.2-ce-ga6
Docker Pull Command
Source Repository

Comments (10)
7 months ago

no I've never tried other application server.
I only use the liferay bundle with tomcat.

8 months ago

did you manage creating a docker container of Liferay with Wildfly?


8 months ago

To create PostgreSQL database, the connection can be done like that:
docker exec -it --user postgres lep-postgresql psql

a year ago


I saw your post n github and wanted to ask you help on this. I am a junior software engineer and trying to learn new things , we have an application that completely runs on liferay and it’s a very common application for all our schools. I want to create a docker image/container for each school like school1_docker_image (this will have life-ray bundle with configurations specific to that school), like that i need it for every school. So, during the release time, we want to deploy this image on a RHEL box and test our application.


2 years ago

having trouble deploying on openstack. Log:

Oct 27, 2015 9:11:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Oct 27, 2015 9:11:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Oct 27, 2015 9:11:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 27, 2015 9:11:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1195 ms
Oct 27, 2015 9:11:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 27, 2015 9:11:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Oct 27, 2015 9:11:10 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/conf/Catalina/localhost/ROOT.xml
Loading jar:file:/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/
Loading jar:file:/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/
Loading file:/opt/liferay-portal-6.2-ce-ga4/
Loading jar:file:/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/
Oct 27, 2015 9:11:56 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
21:12:02,663 INFO [localhost-startStop-1][DialectDetector:71] Determine dialect for HSQL Database Engine 2
21:12:02,682 WARN [localhost-startStop-1][DialectDetector:86] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in
21:12:02,740 INFO [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.HSQLDialect
21:12:08,439 ERROR [localhost-startStop-1][Cache:120] Unable to set localhost. This prevents creation of a GUID. Cause was: instance-00000003: instance-00000003 instance-00000003: instance-00000003
at net.sf.ehcache.Cache.<clinit>(
at net.sf.ehcache.config.ConfigurationHelper.createCache(
at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(
at net.sf.ehcache.CacheManager.configure(
at net.sf.ehcache.CacheManager.doInit(
at net.sf.ehcache.CacheManager.init(
at net.sf.ehcache.CacheManager.<init>(
at com.liferay.portal.cache.ehcache.CacheManagerUtil.createCacheManager(
at com.liferay.portal.cache.ehcache.EhcachePortalCacheManager.afterPropertiesSet(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(

2 years ago

Hi Snasello,

thank you for your answer.
The logs doesn't tell me any interesting but i will do more investigation.
I will keep you up-to-date...

2 years ago

@carstenlaengerer, we use jenkins for deploying every day and we haven't those problems. Have you check liferay logs ?

2 years ago

@tristam did you try :
docker pull snasello/docker-debian-java7:7u79
for me it works.

2 years ago


my liferay container stops always after some time or multiple deployments of portlets. I think the first is caused by docker automatism and there are known workarounds . But the later is really annoying! have someone else the some behavior or is it single problem my environment.

2 years ago

Having problems with this image, get error 400. I've tried to pull the docker-debian-java7 image referenced in the docker file and that fails.