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 : https://registry.hub.docker.com/u/snasello/liferay-6.2/
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.

Mysql

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

PostgreSQL

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=# CREATE DATABASE lportal WITH ENCODING 'UTF8';
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
Owner
snasello
Source Repository

Comments (10)
snasello
7 months ago

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

nfigay
8 months ago

Hello,
did you manage creating a docker container of Liferay with Wildfly?
Regards.

Nicolas

corebreaker
8 months ago

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

sjaligam
a year ago

Hi,

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.

Regards,
Saketh.

dgascue
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!/system.properties
Loading jar:file:/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/opt/liferay-portal-6.2-ce-ga4/portal-bundle.properties
Loading jar:file:/opt/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
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 portal-ext.properties.
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
java.net.UnknownHostException: instance-00000003: instance-00000003
at java.net.InetAddress.getLocalHost(InetAddress.java:1475)
at net.sf.ehcache.Cache.<clinit>(Cache.java:214)
at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:296)
at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:219)
at net.sf.ehcache.CacheManager.configure(CacheManager.java:762)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:463)
at net.sf.ehcache.CacheManager.init(CacheManager.java:392)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:266)
at com.liferay.portal.cache.ehcache.CacheManagerUtil.createCacheManager(CacheManagerUtil.java:38)
at com.liferay.portal.cache.ehcache.EhcachePortalCacheManager.afterPropertiesSet(EhcachePortalCacheManager.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)

carstenlaengerer
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...

snasello
2 years ago

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

snasello
2 years ago

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

carstenlaengerer
2 years ago

Hi,

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.

tristram
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.