thibaultclem / docker4dev-exo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guide

Prerequisites

  • docker, docker-machine and docker-compose installed

  • PLF version available like below:

$ git clone git@github.com:exoplatform/platform-private-distributions.git && cd platform-private-distributions
$ mvn clean package -Pexo-release,exo-private -Dskip-archive
$ cp -R plf-enterprise-jbosseap-standalone/target/platform*/platform* ../exodev-base-plf/plf43-jboss/plf
$ cp -R plf-enterprise-tomcat-standalone/target/platform*/platform* ../exodev-base-plf/plf43-tomcat/plf

Docker Machine

$ docker-machine create -d virtualbox --virtualbox-cpu-count "4" --virtualbox-memory "4096" exodev-plf
$ eval $(docker-machine env exodev-plf)

To check that the conf is ok:

docker-machine inspect exodev-plf

Start a Docker Machine

docker-machine start exodev-plf

Stop a Docker Machine

docker-machine stop exodev-plf

eXo Base

$ cd exodev-base
$ docker build --rm=true --tag=exodev/base:latest .
$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
exodev/base         latest              f27148ddd088        13 seconds ago      207.4 MB
centos              7                   0f73ae75014f        9 days ago          172.3 MB

eXo Base JDK

$ cd exodev-base-jdk/jdk7
$ docker build --rm=true --tag=exodev/base-jdk:7 .
$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
exodev/base-jdk     7                   b5ddc5fd7b90        About a minute ago   434.4 MB
exodev/base         latest              f27148ddd088        5 minutes ago        207.4 MB
centos              7                   0f73ae75014f        9 days ago           172.3 MB

eXo Base PLF

eXo Base PLF Common

$ cd exodev-base-plf/plf43-common
$ docker build --rm=true --tag=exodev/base-plf:4.3.x .
$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
exodev/base-plf     4.3.x               5a5e60723691        8 seconds ago       434.4 MB
exodev/base-jdk     7                   b5ddc5fd7b90        4 minutes ago       434.4 MB
exodev/base         latest              f27148ddd088        7 minutes ago       207.4 MB
centos              7                   0f73ae75014f        9 days ago          172.3 MB

eXo Base PLF JBoss

Docker Image

$ cd exodev-base-plf/plf43-jboss
$ docker build --rm=true --tag=exodev/plf-jboss:4.3.x .
$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
exodev/plf-jboss    4.3.x               2c49d45117a0        13 minutes ago      1.199 GB
exodev/base-plf     4.3.x               fd062cab3937        20 minutes ago      434.4 MB
exodev/base-jdk     7                   b5ddc5fd7b90        52 minutes ago      434.4 MB
exodev/base         latest              f27148ddd088        55 minutes ago      207.4 MB
centos              7                   0f73ae75014f        9 days ago          172.3 MB

Run a container

$ docker run -p 43180:8080 -p 43190:9990 --name=plf43-jboss  exodev/plf-jboss:4.3.x
$ open http://$(docker-machine ip exodev-plf):43180

eXo Base PLF Tomcat

Docker Image

  • Build image

$ cd exodev-base-plf/plf43-tomcat
$ docker build --rm=true --tag=exodev/plf-tomcat:4.3.x .

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
exodev/plf-tomcat   4.3.x               bc7d3fb92e2c        19 minutes ago      919.3 MB
exodev/base-plf     4.3.x               fd062cab3937        20 minutes ago      434.4 MB
exodev/base-jdk     7                   b5ddc5fd7b90        52 minutes ago      434.4 MB
exodev/base         latest              f27148ddd088        55 minutes ago      207.4 MB
centos              7                   0f73ae75014f        9 days ago          172.3 MB
  • Remove image

    docker rmi -f exodev/plf-tomcat:4.3.x

Run a container

Once the image has been built, you can run a container from this image:

$ docker run -p 43280:8080 --name=plf43-tomcat  exodev/plf-tomcat:4.3.x
$ open http://$(docker-machine ip exodev-plf):43280

eXo Base PLF Tomcat/MySQL

Docker Image

  • Build image

$ cd exodev-base-plf/plf43-tomcat-mysql
$ docker build --rm=true --tag=exodev/plf-tomcat-mysql:4.3.x .

Run a container

Once the image has been built, you can run a container from this image:

$ docker-compose up
$ open http://http://$(docker-machine ip exodev-plf):43380

eXo Base PLF Tomcat/Oracle

  1. Run the Oracle Container with SID plf

$ cd exodev-base-plf/plf43-tomcat-oracle
$ docker-compose -f oracle.yml up
  1. Check that it’s running

$ open http://$(docker-machine ip exodev-plf):49162/apex
Note

Use e following credentials:

  • workspace: INTERNAL

  • user: ADMIN

  • password: oracle

  1. Run the tomcat container

$ docker-compose -f tomcat.yml up

eXo with Addons

PLF Tomcat Addons

Remote add-on

If the add-on is available on the remote catalog, you just have to build an image like below:

$ docker-compose up -d
$ open http://http://$(docker-machine ip exodev-plf):43380

Local add-on

If you want to test a local add-on, you have to add it to your image with a Docker volume:

  1. build your add-on locally with Maven

  2. copy the ZIP file to exodev-plf-addons/plf43-tomcat-XXX-task/local/resources/task-addon.zip

  3. execute the following commands:

$ docker-compose up
$ open http://$(docker-machine ip exodev-plf):43380

PLF JBoss Addons

$ cd exodev-plf-addons/plf43-jboss-task
$ docker build --rm=true --tag=exodev/plf43-jboss-task .

$ docker run -p 43480:8080 -p 43490:9990 --name=plf43-jboss-task  exodev/plf43-jboss-task
$ open http://http://$(docker-machine ip exodev-plf):43480

About


Languages

Language:Shell 100.0%