akeneo / dockerfiles Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED for PIM 4.0 and above - Official Dockerfiles for Akeneo development and testing
Home Page: https://hub.docker.com/r/akeneo/
License: MIT License
DEPRECATED for PIM 4.0 and above - Official Dockerfiles for Akeneo development and testing
Home Page: https://hub.docker.com/r/akeneo/
License: MIT License
Composer install fails randomly. Change its install script to a more robust one.
The akeneo and akeneo-behat containers (both apache and fpm) needs the option user: docker
. Otherwise it will run with root user.
As PHP 7.1 has been released, it is now time to update the master branch with it.
docker-compose for behat should link in read-only the PIM from the host to the selenium container the same way it is with the apache-php container.
This is mandatory for file uploads to work in tests.
Also, remove ':80' from 'base_url' in behat.yml example.
Relates to #123
It seems that nginx and akeneo-fpm images don't wait for each other on launching, and close immediately.
After running docker-compose up -d
, both are immediately with status "EXIT".
Each image should have only its own documentation, minimalistic.
Documentation about using docker-compose files should be separated and as didactic as possible.
There should be 2 docker-compose.yml.dist files, one for Apache, one for nginx + FPM, both with dev and test environment (on two separated networks).
Links pointing to this documentation should be available on the main README and in the README on each terminal Dockerfile.
phpdismod
is overridden by the entrypoint script.
Best way is to add an environment variable to this script to activate Xdebug.
It should be deactivate by default.
Environment variable should all be present (even if commented) in the compose files provided in the repository.
Right now, when a branch is pushed, a build is launched on docker hub.
Build should only be launched on selected branches (for the moment, only master, more to come with PHP 7 and PHP-FPM).
No need on behat images
The akeneo-fpm gives this back to me when issuing a docker-compose up akeneo
:
Starting pimcommunitydev_mongodb_1
Starting pimcommunitydev_mysql_1
Starting pimcommunitydev_akeneo_1
Attaching to pimcommunitydev_akeneo_1
akeneo_1 | [19-Jan-2017 14:18:18] ERROR: Unable to create the PID file (/run/php/php7.1-fpm.pid).: No such file or directory (2)
akeneo_1 | [19-Jan-2017 14:18:18] ERROR: FPM initialization failed
pimcommunitydev_akeneo_1 exited with code 78
Missing space after :
There also a missing parameter: serverName
.
I'm sorry to spam you with issues.
I'm trying to get access to the REST api using http://127.0.0.1:8080/api/rest/products/AKNMUG_BP but all I get is a 404 from the web server.
Is there something to add to nginx/apache to get the api working or am I doing something wrong?
Docker hub automated builds allow to chose the folder of the dockerfile, so they can all coexist in the same GitHub repository.
This repo should then be simply named "dockerfiles"
This will make php-fpm images easier.
Create a minimal Debian image and use it instead of debian:jessie
pim-cac
, pim-in-ass
and pim-initialize
remove all the cache each time.
Only the cache related to the container should be removed. For instance, in akeneo
image, only remove dev
and prod
, and in behat, only behat
cache.
Also, behat tmp dir should be directly in app
, and trash at each behat install.
Base on "official" nginx images from docker hub, and configure it so:
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Affected image and tag | new one |
When running both akeneo and akeneo-behat environments through one compose file (akeneo on localhost:8080 and akeneo-behat on 8081), when a user logs in one environment, he/she is disconnected from the other one.
The problem is observed with both Apache + mod_php and Apache (FCGI) + FPM
Solution
The easiest way to handle this is to use a reverse proxy on the host machine. This should be documented.
Example with Apache, assuming the Docker container is mapped on port 8080
and we want to redirect it on the domain name pim-ce.local
:
<VirtualHost *:80>
ServerName pim-ce.local
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
We could also use Traefik.
Hello,
I'm trying to use the docker-compose files to have a dev environment for Akeneo. I may have gotten something wrong, but at least the apache version, when running the docker-compose exec akeneo php -d memory_limit=-1 /usr/local/bin/composer update
I get a missing ext-mongodb
dependency for the system. I have this with akeneo:php-5.6
as well as latest
.
Here is the complete stacktrace:
Problem 1
- alcaeus/mongo-php-adapter 1.0.0 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.1 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.2 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.3 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.4 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.5 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.6 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.7 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- alcaeus/mongo-php-adapter 1.0.8 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1].
- mongodb/mongodb 1.1.1 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.1.0 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.4 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.3 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for alcaeus/mongo-php-adapter ^1.0 -> satisfiable by alcaeus/mongo-php-adapter[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php5/cli/php.ini
- /etc/php5/cli/conf.d/05-opcache.ini
- /etc/php5/cli/conf.d/10-pdo.ini
- /etc/php5/cli/conf.d/20-apcu.ini
- /etc/php5/cli/conf.d/20-curl.ini
- /etc/php5/cli/conf.d/20-gd.ini
- /etc/php5/cli/conf.d/20-imagick.ini
- /etc/php5/cli/conf.d/20-intl.ini
- /etc/php5/cli/conf.d/20-json.ini
- /etc/php5/cli/conf.d/20-mcrypt.ini
- /etc/php5/cli/conf.d/20-mongo.ini
- /etc/php5/cli/conf.d/20-mysql.ini
- /etc/php5/cli/conf.d/20-mysqli.ini
- /etc/php5/cli/conf.d/20-pdo_mysql.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Only Apache should be start in front mode, and other services should be assemble with docker-compose.
Relates to #122.
Currently, there is minor differences between the documentation of each branch. So it is easy to have errors, because one reads the master documentation when using php-5.6
branch images, for example.
php-5.6
does not require alcaeus/mongo-php-adapter
on composer update, only needed for PHP 7.x,--ignore-platform-reqs
is only needed if using doctrine/mongodb-odm-bundle on PHP 7.x.PHP_XDEBUG_DEFAULT_ENABLE
is confusing and useless. It should be removed.
Other variables, except for BEHAT_TMPDIR
, are set with default values, so they should be commented in compose files examples.
Right now, this image is only a common base for both carcel/akeneo
and carcel/akeneo-behat
.
However, it should be configurable, like nginx
images, allowing to copy an Apache vhost in it when running a container. This way, the image could be usable for any Symfony or PHP application.
akeneo
to apache-php
image/home/docker/symfony
instead of /home/docker/pim
(already the same for fpm and nginx images)For the moment, Travis only builds the images in cascade.
For each image, we should define some tests to run before building the next image.
Build should be stop as soon as an error is detected and return the error code.
Each image tests must be placed in the image folder, in a "test" subfolder, all its content ran automatically by the main script (so there's nothing to do in it when adding a new test).
Look at Symfony templates for inspiration, and describe process (what base branch to choose for the PR and why, how to label both commits and PR…).
Uploads do not work, maybe due to absence of the rewrite rules present in the apache images, maybe another reason.
Investigation needed.
Only needed for php:7.0
It is useless to do an apt-get autoclean
, as an apt-get clean
is already performed.
apt-get autoremove
must be appended with --purge
Add full options in the commands for readability: --yes
instead of -y
Same result can be obtained with official nginx images and environment variables.
carcel/fpm
, not only in the akeneo fpm imagescarcel/nginx
image in the compose filesNeeds #20 to be done
Like there is a command pim-initialize
and pim-in-ass
, there should be a command pim-cac
:
Also, pim-initialize
and pim-in-ass
should dump assets as symlinks even in behat images.
Only PHP CLI images are provided, for legacy compatibility on Akeneo 1.4 and 1.5, to be able to run unit tests.
May be removed in the future, so this issue is on hold for the moment.
Behat cache is not completely removed.
Right now, there is no check prior to PR than building and running the docker images locally.
A dockerfile checkstyle should also be added.
Check what exists in term of continuous integration.
Add packages imagemagick
and php5-imagick
User have to be changed to docker at the very end of the Dockerfile, or it won't work…
When running docker-compose up -d
for behat env, the folder /tmp/behat/screenshots
is automatically created (which is good!), but with access only for root user, making scenario fail (which, obviously, is bad!).
We need to find a way to automatically create it with full read/write accesses for everyone (or at list for the user running the containers). We can update the PIM compose file to remove this bind mount, and set the screenshot folder directly in a PIM subfolder, as it is configurable through environment variable.
=> ADD THIS TO TROUBLESHOOTING SECTION
php -d memory_limit=-1
to prevent any memory problem--ignore-platform-reqs
must be added.Base the images on carcel/fpm, and use nginx in docker-compose.yml.dist
The entrypoint should remove the pid
Akeneo EE tests needs perceptualdiff for asserting images transformations of the PAM.
In docker-compose.yml, BEHAT_TMPDIR must be non recursive on creation ( meaning only one new folder in an existing one, no imbrication, for instance "app/tmp").
Add tag "php-7.0" on docker hub, based on the master branch.
As the server is configured in nginx containers, there is no need to have two images. The compose file can provide one fpm container with two nginx containers, one for prod/dev, the other for fpm.
And should contain this xdebug.remote_enable=1 in /etc/php5/apache2/conf.d/20-xdebug.ini
sudo echo "xdebug.remote_enable=1" >> /etc/php5/apache2/conf.d/20-xdebug.ini
Selenium should have read and write access to the PIM and to the screenshot folder.
Add BEHAT_TMPDIR
environment variable to docker-compose.yml.
PHP uploads are on default value. Set max_upload and post_max to 20M, both apache, CLI and FPM.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.