OpenCATS documentation
  • >current release 0.9.7.4
  • Introduction and Overview
    • Licensing
    • Authors and Contributors
  • Installation
    • Install on Ubuntu
    • Install on Windows
    • Run the Installer
  • Using the software
    • companies, contacts, job orders, and candidates
    • Screens In-Depth
  • How-to's
    • Hiding tabs
    • Password resets
    • Emails & reminders
  • Technical configuration options
    • Technical overview of original OpenCATS Source code
    • Access control lists
    • CMS addons
    • Dev Guide to migrate Legacy to Symfony
    • Developer Guide
    • How_to_install_Sphinx
    • How_to_script_database_backups
    • Docker - OpenCATS Installation Instructions
    • LDAP_Authentication_module
    • Multi lingual_version
    • OpenCATS Youtube channel
    • Pre-requisites
    • Roadmap
    • Vital Security: Restrict access to upload folders (.htaccess)
    • OpenCATS Backup/Restore and Upgrade Instructions-THIS SECTION INCOMPLETE!
Powered by GitBook
On this page
Edit on GitHub
  1. Technical configuration options

Docker - OpenCATS Installation Instructions

PreviousHow_to_script_database_backupsNextLDAP_Authentication_module

Last updated 2 years ago

##Docker

These instructions are for the environment only. Download and install the following software:

  • Docker and Docker ToolBox

  • for Windows

  • for Linux

  • for MAC OSX

##Architecture

OpenCATS is installed in container without database. Database in in extra container. Optinaly it is also possible to create container with phpmyadmin to manage mysql database.

##Dockerfile

OpenCats docker file is based on All dependencies are installed into the image.

##docker-compose.yml

To build / install all images, it is possible to write docker-compose.yml file containg all containers definitions. Example of docker-compose.yml

opencats:
    container_name: opencats
    build: .
    ports:
        - 80:80
    links:
        - mysql

mysql:
    container_name: mysqlserver
    image: mysql:5.5
    ports:
        - 3306:3306
    volumes:
        - /var/lib/mysql
    environment:
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: cats_dev
        MYSQL_USER: cats
        MYSQL_PASSWORD: password

phpmyadmin:
    container_name: phpmyadmin
    image: phpmyadmin/phpmyadmin
    ports:
        - 8080:80
    links:
        - mysql:db
    environment:
        PMA_HOST: db
        PMA_USER: cats
        PMA_PASSWORD: password

Database server name for configuration is mysql, cats-dev database is created automaticaly with user cats and password password. phpmyadmin is listening on port 8080, opencats on port 80.

To build images:

docker-compose build

to start images:

docker-compose up -d

When image running, it is necessary to initialize DB schema and configure openCATS. Steps are described in [Install on Windows Tutorial]

#Using docker for development

It is possible to run opencats also in development mode, when sources are on host computer and web server is in docker. Slightly modified Dockerfile (php environment with pre-installed libraries) and docker-compose.yml is necessary

FROM php:5.5-apache
RUN apt-get update && \
    apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libncurses5-dev \
        libicu-dev \
        libmemcached-dev \
        libcurl4-openssl-dev \
		libpng-dev \
        libpng12-dev \
        libgmp-dev \
        libxml2-dev \
		libldap2-dev \
		php-soap \
        curl \
        zlib1g-dev \
        ssmtp

RUN apt-get install -y \
		antiword \
		poppler-utils \
		html2text \
		unrtf

RUN rm -rf /var/lib/apt/lists/* 
	
RUN ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h

RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
    docker-php-ext-install ldap && \
    docker-php-ext-configure mysql --with-mysql=mysqlnd && \
    docker-php-ext-configure mysqli --with-mysqli=mysqlnd && \
    docker-php-ext-install mysqli && \
    docker-php-ext-install mysql && \
    docker-php-ext-install soap && \
    docker-php-ext-install intl && \
    docker-php-ext-install mcrypt && \
    docker-php-ext-install gd && \
    docker-php-ext-install gmp && \
    docker-php-ext-install zip

and docker-compose.yml` (web part])

opencats-dev:
    container_name: opencats-dev
    build: <path to dir with dockerfile>
    ports:
        - 80:80
    links:
        - mysql
    volumes:
        - .:/var/www/html

It mounts your local . directory as /var/www/html inside the container

###Notes for windows users

  • sources must be in user profiles directory, for example in Documents. This is docker limitation

  • Files shall usu LF EOL (not CRLF) because sources dir on windows partition is mounted under Linux file system.

Docker
https://docs.docker.com/engine/installation/windows/
https://docs.docker.com/engine/installation/linux/
https://docs.docker.com/engine/installation/mac/
php 7.2 docker image