A Liferay 6.2 ga6 container with separation of liferay-home and portal bundle files.
In order to build the image execute this command in the terminal
docker build -f Dockerfile -t duffmck/docker-liferay:latest .
Inside the image you will find:
- Liferay 6.2 ga6 bundle
- Liferay CE remote IDE connector
- Liferay Marketplace portlet
You can start it directly, it will use the hsqldb (not for production!)
docker run --rm -t -i -p 8080:8080 duffmck/docker-liferay
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)
Acutally you can link it with mysql but it is easy to add one.
First start the mysql image
docker run --name lf-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 and a volume mounted on a folder (on your host) for the liferay home directory
docker run --name liferay-6.2 --rm -it -p 8080:8080 --link lf-mysql:db_lep -v /tmp/liferay-home:/var/liferay-home -e DB_TYPE=MYSQL duffmck/docker-liferay
where:
- --name liferay-6.2 -> is the name of container
- --link lf-mysql:db_lep -> is the link to container with MySQL:
lf-mysql
is the name of containerdb_lep
is the reference available into the Liferay container (used in the MySQL connection string jdbc:mysql://db_lep/lportal)
- -v /tmp/liferay-home:/var/liferay-home -> is the volume for the liferay home directory:
/tmp/liferay-home
is the absolute path of a directory on the host (your computer)/var/liferay-home
is the path used by Liferay, do not change this value