Coder Social home page Coder Social logo

docker5's Introduction

Docker images with ready-to use ConcreteCMS

Docker images that provide pre-installed ConcreteCMS instances without the hassle of configuring them.

Example: if you want to test your ConcreteCMS package with ConcreteCMS 8.5.4, you can simply run this command:

docker run --rm -it -p 8080:80 -p 33306:3306 -p 8025:8025 -v /path/to/your/package:/app/packages/package_handle ghcr.io/concrete5-community/docker5:8.5.4-full

Where:

  • 8080 is the port where you'll browse the ConcreteCMS website (available at http://localhost:8080)
  • 33306 is the port where you'll find MySQL
  • 8025 is the port where you'll browse the mails sent by the ConcreteCMS website (available at http://localhost:8025)
  • /path/to/your/package is the absolute path of the ConcreteCMS package you are going to test (on Windows use \ instead of /)
  • package_handle is the handle of the package

You can then install the package through the web interface or through the CLI interface (c5 c5:package:install package_handle).

Development versions

In addition to the official releases, you can also use the development versions of Concrete (updated twice a day).

At the time of writing, the development branches are:

  • 8.5.x
  • 9.2.x
  • 9.3.x

For example, to use 9.3.x (with full sample content), you can use this image:

ghcr.io/concrete5-community/docker5:9.3.x-full

References

Pre-compiled images: https://github.com/concrete5-community/docker5/pkgs/container/docker5

Source repository: https://github.com/concrete5-community/docker5

Configuration parameters

  • Password of the admin user: 12345
  • Name of the ConcreteCMS database: c5
  • Database user name: c5
  • Database user password: 12345
  • Exposed port for the website: 80
  • Exposed port for the database: 3306
  • Exposed port for the webmail: 8025

Additional CLI commands

docker5 images come with some service CLI commands. You can get a list of them by running the ccm-help CLI command.

PHP Versions

Every docker image contains multiple PHP versions: 5.6, 7.4, 8.1, and 8.2.

When using the default entry point you can override the default one by specifying the CCM_PHP_VERSION environment variable, like this:

docker run --rm -e "CCM_PHP_VERSION=7.4" ghcr.io/concrete5-community/docker5:8.5.4-full

From within the container you can use the switch-php command:

switch-php 7.4

Composer Versions

Every docker image contains both composer v1 and composer v2.

When using the default entry point you can override the default one by specifying the CCM_COMPOSER_VERSION environment variable, like this:

docker run --rm -e "CCM_COMPOSER_VERSION=2" ghcr.io/concrete5-community/docker5:9.0.2-full

From within the container you can use the switch-composer command:

switch-composer 2

PHPUnit Versions

Every docker image contains many PHPUnit versions.

When using the default entry point you can override the default one by specifying the CCM_PHPUNIT_VERSION environment variable, like this:

docker run --rm -e "CCM_PHPUNIT_VERSION=10" ghcr.io/concrete5-community/docker5:9.0.2-full

From within the container you can use the switch-phpunit command:

switch-phpunit 10

Starting/stopping services

The default entry point will start the database and web services at startup, and stop them at shutdown.

You can also control them by using the ccm-service command to start/stop/restart these services, as well as to determine if they are running.

# Start all the services
ccm-service start
# Stop all the services
ccm-service stop
# Restart only the database service
ccm-service restart db
# Check if the PHP-FPM service and the Nginx services are running
ccm-service status php-fpm nginx

Notifications

This repository contains a copuple of scheduled GitHub Actions. If you want to be notified about problems, you can subscribe to this Telegram channel.

docker5's People

Contributors

1stthomas avatar github-actions[bot] avatar mlocati avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker5's Issues

Undefined variable $ms

requesting 9.0.1 version there's the same error on updating and connecting to concrete project:

in file /app/concrete/src/Marketplace/Marketplace.php line 88

Whoops \ Exception \ ErrorException (E_WARNING)
Undefined variable $ms

`
$this->isConnected = false;

    if ($csToken != '') {
        $fh = $this->app->make('helper/file');
        $installationService = $this->app->make(InstallationService::class);
        if ($installationService->isMultisiteEnabled()) {
            $ms = '&ms=1';
        }
        $csiURL = urlencode($this->getSiteURL());
        **$url = $this->config->get('concrete.urls.concrete') . $this->config->get('concrete.urls.paths.marketplace.connect_validate') . "?csToken={$csToken}&csiURL=" . $csiURL . "&csiVersion=" . APP_VERSION . $ms;**
        $vn = $this->app->make('helper/validation/numbers');
        $r = $this->get($url);

        if ($r === null && !$this->connectionError) {
            $this->isConnected = true;
        } else {
            if ($vn->integer($r)) {
                $this->isConnected = false;
                $this->connectionError = $r;

`

no issue with upgrading from 8.5.4 > 9.1.3
or with latest version

tag most recent concrete5 version with latest/latest-full

On the docker hub repo you should tag the most recent version of concrete5 with :latest and possibly :latest-full . It is common to run without tags when you want the latest for example running docker pull php returns php7.4/buster

If you run docker run --rm -it -p 8080:80 mlocati/docker5 it will currently return an error response as there isn't a :latest version

Example error :

docker run --rm -it -p 8080:80 mlocati/docker5
Unable to find image 'mlocati/docker5:latest' locally
docker: Error response from daemon: manifest for mlocati/docker5:latest not found: manifest unknown: manifest unknown.

Latest image fails to start nginx

Steps to reproduce:

$ docker run --rm -it -p 8080:80 -p 33306:3306 ghcr.io/concrete5-community/docker5:9.1.1-full

Expected:

Starting MariaDB... done.
Starting Nginx... done.
Starting PHP-FPM... done.

... and a running container.

Actual:

Starting MariaDB... done.
Starting Nginx... 
FAILED!.
Starting PHP-FPM... done.
Failed to start services

... and the container exits.

By overriding the entrypoint to get into the container's shell, I issued ccm-service start with the same result, and found this in /var/log/nginx/error.log:

2022/09/09 19:00:13 [emerg] 332#332: socket() [::]:80 failed (97: Address family not supported by protocol)

Possibly relevant: the host is IP4-only. Is that an exotic scenario? Many desktop linux users disable IP6.

Cannot use latest 9.2.2 release

I just tried to get the 9.2.2 image of concreteCMS (ghcr.io/concrete5-community/docker5:9.2.2).
Got an error: docker: Error response from daemon: manifest unknown.
ghcr.io/concrete5-community/docker5:9.2.2-full doesn't work either.
Looking at https://github.com/concrete5-community/docker5/pkgs/container/docker5 I can't see an image of the 9.2.2 version.

(I thought the image creation should be automated when a new version was released. If so this process didn't work as expected)

Trouble Installing PHP Module (Mongodb)

Can anyone provide guidance on installing additional PHP modules when using this repo? I'm working on a custom package that needs mongodb.

I'm running the container with the command:
docker run --rm -it -p 80:80 -p 33306:3306 -v d/mypackage_handle:/app/packages/mypackage_handle -e "CCM_PHP_VERSION=7.4" -e "CCM_COMPOSER_VERSION=2" ghcr.io/concrete5-community/docker5:9.1

At the bash shell of the container, I've tried installing mongodb via command line, enabling it in php.ini, and restarting services but when I attempt to run compose install in my package directory, it still errors out saying mongodb "is missing from your system. Install or enable PHP's mongodb extension.".

When I running php --ini it begins with the Warning:

PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/lib/php/20190902/mongodb.so (/usr/lib/php/20190902/mongodb.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/mongodb.so.so (/usr/lib/php/20190902/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

And running find / -name mongodb.so shows the file is in fact at
/usr/lib/php/20210902/mongodb.so

(Copying the file to /usr/lib/php/20190902/mongodb.so does not help)

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.