Dockerfile
FROM php:7.2-apache
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions gd intl imagick pgsql mysqli pdo_mysql ldap soap zip opcache apcu
#add lat reqs
COPY php.ini "$PHP_INI_DIR/php.ini"
RUN rm -rf /var/lib/apt/lists/*
#official Code
ARG VERSION=1.11.10
ARG DIRECTORY=chamilo
ADD https://github.com/chamilo/chamilo-lms/releases/download/v${VERSION}/chamilo-${VERSION}-php7.2.tar.gz /tmp/
RUN a2enmod rewrite && \
chown -R www-data:www-data /tmp/chamilo-${VERSION}-php7.2.tar.gz
USER www-data
RUN tar -xzf /tmp/chamilo-${VERSION}-php7.2.tar.gz -C /var/www/html/ && \
mv /var/www/html/chamilo-${VERSION} /var/www/html/${DIRECTORY} && \
rm /tmp/chamilo-${VERSION}-php7.2.tar.gz
USER root
#COPY . /var/www/html/${DIRECTORY}
#fix instalation
VOLUME ["/var/www/html/${DIRECTORY}/vendor", "/var/www/html/${DIRECTORY}/main/default_course_document/images", "/var/www/html/${DIRECTORY}/main/lang", "/var/www/html/${DIRECTORY}/web", "/var/www/html/${DIRECTORY}/app"]
Portainer/Compose:
Example with an extra container for libreoffice (optional? testing for rapid) and maraidb
version: '2'
services:
libreoffice:
image: xcgd/libreoffice:6
container_name: libreoffice
hostname: libreoffice.docker
restart: always
volumes:
- type: tmpfs
target: /tmp
network_mode: bridge
chamilo_db:
image: mariadb:10.5
container_name: chamilo_db
hostname: chamilo_db.docker
restart: always
environment:
MYSQL_ROOT_PASSWORD: passforrootonchamilo
volumes:
- chamilo_db_data:/var/lib/mysql
network_mode: bridge
chamilo:
image: chamilo:1.11.10
container_name: chamilo
hostname: chamilo.docker
restart: always
volumes:
- chamilo_images:/var/www/html/chamilo/main/default_course_document/images/
- chamilo_lang:/var/www/html/chamilo/main/lang/
- chamilo_web:/var/www/html/chamilo/web/
- chamilo_app:/var/www/html/chamilo/app/
- chamilo_vendor:/var/www/html/chamilo/vendor
# - /tmp/empty_dir_after_install:/var/www/html/chamilo/main/install
ports:
- "8069:80"
network_mode: bridge
depends_on:
- chamilo_db
links:
- "chamilo_db"
- "libreoffice"
go to http://localhost:8069/chamilo and proceed to install
while installing set the database server to chamilo_db, user root, and password as set on the mariadb container (passforrootonchamilo on the example) or whatever mysql server you prepared, with a user with enough permissions to create a database
Content type
Image
Digest
Size
1 GB
Last updated
about 6 years ago
docker pull kurenairyu/chamilo:1.11.10