Public | Automated Build

Last pushed: 2 years ago
Short Description
Osclass container (Ubuntu and Alpine version)
Full Description


This readme file will guide you through the process of migrating an Osclass installation to a Docker infrastructure.

The infrastructure consists of six Docker containers: Three server containers and three volume containers.

  1. Mysql database
  2. Postfix server
  3. Apache2 Webserver
  4. Osclass volume
  5. Database volume
  6. Backup volume


  1. Install Docker, Docker-machine and Docker-compose (refer to Docker documentation for different distros)

    NOTE: If you are working with Linux, you just need docker and docker-compose.

Tested on Osclass 3.5.


  1. Create the virtualbox machine.

     $ docker-machine create --driver virtualbox dockerenv 
     $ docker-machine active dockerenv
     $ $(docker-machine env dockerenv)
  2. Download scripts and cd to folder.

     $ git clone
  3. Replace files from migrate folder with the prerequisites migrate files.

    a. backup_osclass.tar.gz for osclass files.

    b. backup.mysql.sql for database dump file.

  4. Modify variables in common.env file in order to customize your domain and password.

     $ vi common.env 
       # Set of variables;

    NOTE: DOMAIN will be used by postfix container and MYSQL_ROOT_PASSWORD for script by OSCLASS container.

  5. Build containers.

     $ docker-compose build
  6. Run containers.

     $ docker-compose up
  7. Launch the following url in your favorite browse.

    You can get your ip with the following command:

     $ docker-machine ip



  1. Create a tar.gz of your current osclass server and replace the backup_osclass.tar.gz that you can find in the folder "migration".

  2. Create a dump file of your osclass database and replace the backup.mysql.sql that you can find in the folder "migration".

  3. We are going to copy the migration folder into the osclass container.

     $ tar -cf - migration | docker exec -i <NAME_OSCLASS_CONTAINER>  /bin/tar -C / -xf -
  4. Now we are ready to run the script in order to import the files and database data into our volume containers.

     $ docker exec -it <NAME_OSCLASS_CONTAINER> bash /

NOTE: These commands are included into Makefile: $ make import


  1. Generate a backup of our osclass files and database.

     $ docker exec -it <NAME_OSCLASS_CONTAINER> bash /
Docker Pull Command
Source Repository