Public Repository

Last pushed: a year ago
Short Description
This is Apache OFBiz pure version, based on java:8
Full Description

Apache OFBiz

1. Apache OFBiz versions:
  • latest
  • 15.12
  • 14.12
  • 13.07
2. ENV variables:
  • INIT_DB:
    • 0(default value): if you already have a database
    • 1: load seed data
    • 2: load demo data
  • DB:
    • postgres: -e DB=postgres
    • mysql: -e DB=mysql
    • derby(by default)
  • XMS:
    • Default value: 256MB
  • XMX:
    • Default value: 512MB
  • MAX_PERM_SIZE:
    • Default value: 512MB
3. Volume
  • /usr/src/ofbiz/framework/entity/config
    Database configuration file, you can download from here
  • /usr/src/ofbiz/runtime
    OFBiz Log
  • /use/src/ofbiz/framework/images/webapp/images
    Image content folder
4. Two steps to get OFBiz up and running:
  • Initialize database(You can go to step 2 if you already have a database)
    docker run --rm -e INIT_DB=1 opensourceknight/ofbiz:15.12
  • Link database container to ofbiz container with --link, for example:
    docker run -d -p 80:8080 -p 8443:8443 --link some-postgres:postgres opensourceknight/ofbiz:15.12
    Key pair after --link parameter:
    • some-postgres is your docker postgres image name.
    • postgres: this value is hard-coded.
5. Pratice
  • Working with embedded derby database:
    docker run -d -e INIT_DB=2 opensourceknight/ofbiz:15.12
    You can change INIT_DB from 2 value to 1 value to use seed data(1 is for seed data and 2 is for demo data)

Now, you can enjoy Apache OFBiz now.

  • Working with postgres database:
  • Working with mysql database:
Updating...(You can ask and post your questions and requirements)
* Feel free to buy me a cup of coffee :)
Docker Pull Command
Owner
opensourceknight

Comments (3)
lethanh
3 months ago

Hi, please can you help? I’m trying to setup an Ofbiz container that will connect to a Postgres instance (container) which is running (but an empty database):

docker run -d --name ofbiz-pg-test -p 5432:5432 -v $PWD:/var/lib/postgresql/data -e POSTGRES_USER=ofbiz -e POSTGRES_PASSWORD=ofbiz -e POSTGRES_DB=ofbiz -e POSTGRES_DB_SCHEMA=public postgres

I can connect to the Postgres instance, and can see the ‘Ofbiz’ database although empty, as I’d expect at this stage, but when I try to run the Ofbiz container and l link to the Postgres I get errors, stating the Postgres drivers are not found

docker run -d -p 8081:8080 -p 8443:8443 -e DB=postgres -e INIT_DB=1 --name ofbiz-test --link ofbiz-pg-test:postgres opensourceknight/ofbiz

java] java.lang.ClassNotFoundException: org.postgresql.Driver

What am I doing wrong, please help? Thanks

opensourceknight
6 months ago

Hi vapor8,
Sorry for late reply, I will update this image in the next month, see you again!

vapor8
6 months ago

This is the most advanced ofbiz+docker I could find, great work.

Is the Dockerfile available?

I'd like to update to latest OFBiz version and build the image from source as my company requires me to use all OpenSource for things like this.