Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile fails to build (Unable to install as Docker container on CentOS 7.9) #905

Open
MondeoSTX opened this issue May 6, 2024 · 3 comments
Labels

Comments

@MondeoSTX
Copy link

MondeoSTX commented May 6, 2024

Hello,

I have cloned the repo (latest) and executed the following command as mentioned in the README-file.
docker build -t self-service-password -f ./docker/Dockerfile ../

It keeps failing on:

#0 11.67 14 package suggestions were added by new dependencies, use `composer suggest` to see details.
#0 11.67 Generating autoload files
#0 11.99 34 packages you are using are looking for funding.
#0 11.99 Use the `composer fund` command to find out more!
#0 12.26 > rm -rf htdocs/vendor/bootstrap
#0 12.27 > cp -R vendor/twbs/bootstrap/dist htdocs/vendor/bootstrap
#0 12.28 cp: cannot create directory 'htdocs/vendor/bootstrap': No such file or directory
#0 12.28 Script cp -R vendor/twbs/bootstrap/dist htdocs/vendor/bootstrap handling the post-update-cmd event returned with error code 1

Does anyone have the same issue?

Thank you!

@MondeoSTX MondeoSTX changed the title Unable to install as Docker container on CentOS 7.9 Dockerfile fails to build (Unable to install as Docker container on CentOS 7.9) May 6, 2024
@coudot
Copy link
Member

coudot commented May 7, 2024

I don't reproduce the issue.

Could you try with:

docker build --rm --no-cache -t self-service-password -f ./docker/Dockerfile ../

@coudot coudot added the question label May 7, 2024
@MondeoSTX
Copy link
Author

MondeoSTX commented May 7, 2024

I have just tried your command, but it fails again.

#0 8.268 - Installing twbs/bootstrap (v5.3.3): Extracting archive
#0 8.315 0/50 [>---------------------------] 0%
#0 8.587 14/50 [=======>--------------------] 28%
#0 8.712 19/50 [==========>-----------------] 38%
#0 8.827 28/50 [===============>------------] 56%
#0 8.939 35/50 [===================>--------] 70%
#0 9.150 41/50 [======================>-----] 82%
#0 9.261 45/50 [=========================>--] 90%
#0 10.26 49/50 [===========================>] 98%
#0 10.72 50/50 [============================] 100%
#0 10.93 16 package suggestions were added by new dependencies, use composer suggest to see details.
#0 10.93 Generating autoload files
#0 11.18 37 packages you are using are looking for funding.
#0 11.18 Use the composer fund command to find out more!
#0 11.41 > rm -rf htdocs/vendor/bootstrap
#0 11.42 > cp -R vendor/twbs/bootstrap/dist htdocs/vendor/bootstrap
#0 11.42 cp: cannot create directory 'htdocs/vendor/bootstrap': No such file or directory
#0 11.42 Script cp -R vendor/twbs/bootstrap/dist htdocs/vendor/bootstrap handling the post-update-cmd event returned with error code 1
#0 11.42 Plugins have been disabled automatically as you are running as root, this may be the cause of the script failure.
#0 11.42 See also https://getcomposer.org/root

Dockerfile:62

60 | cp -a /var/www/conf/config.inc.php /var/www/config.inc.php.orig
61 | COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
62 | >>> RUN cd /var/www && /usr/bin/composer install
63 | RUN buildDeps="${BUILDDEP}"
64 | && apt-get purge -y --auto-remove $buildDeps \

ERROR: failed to solve: process "/bin/sh -c cd /var/www && /usr/bin/composer install" did not complete successfully: exit code: 1

@coudot
Copy link
Member

coudot commented May 7, 2024

#0 11.42 Plugins have been disabled automatically as you are running as root, this may be the cause of the script failure.

Seems the cause of your problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants