I am trying to create an image of "erseco/alpine-php-webserver" including composer (https://hub.docker.com/r/erseco/alpine-php-webserver)
The documentation says to build an image using the following Dockerfile:
Docker
FROM erseco/alpine-php-webserver:latest
USER root
# Install composer from the official image
RUN apk add --no-cache composer
USER nobody
# Run composer install to install the dependencies
RUN composer install --optimize-autoloader --no-interaction --no-progress
Which i did in the OMV compose plugin without success.
It throws out the following error:
Code
500 - Internal Server Error
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LC_ALL=C.UTF-8; export LANGUAGE=; docker build --progress plain --tag 'erseco/alpine-php-webserver_composer' '/srv/dev-disk-by-label-SSD_Data/appdata/YAML_Storage/erseco/alpine-php-webserver_composer/' 2>&1': #0 building with "default" instance using docker driver #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 488B done #1 DONE 0.0s #2 [internal] load metadata for docker.io/erseco/alpine-php-webserver:latest #2 DONE 0.0s #3 [internal] load .dockerignore #3 transferring context: 2B done #3 DONE 0.0s #4 [1/3] FROM docker.io/erseco/alpine-php-webserver:latest #4 DONE 0.0s #5 [2/3] RUN apk add --no-cache composer #5 CACHED #6 [3/3] RUN composer install --optimize-autoloader --no-interaction --no-progress #6 0.178 Composer could not find a composer.json file in /var/www/html #6 0.178 To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage #6 ERROR: process "/bin/sh -c composer install --optimize-autoloader --no-interaction --no-progress" did not complete successfully: exit code: 1 ------ > [3/3] RUN composer install --optimize-autoloader --no-interaction --no-progress: 0.178 Composer could not find a composer.json file in /var/www/html 0.178 To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage ------ Dockerfile:13 -------------------- 11 |...
So in general i think it says that the composer.json file is missing?
Anyone got an idea what i need to do?