failed to build RUN apt-get update && apt-get install lsphp74-pgsql
denjakah opened this issue · comments
Heden commented
Hi,
I'm want using lsphp74-pgsql for db connection to postgreSQL, when i re-build there are error like below.
[root@myserver ols-docker-env]# docker-compose up --build
Building litespeed
Step 1/2 : FROM litespeedtech/openlitespeed:latest
---> 30d522c28646
Step 2/2 : RUN apt-get update && apt-get install lsphp74-pgsql
---> Running in c2b59d2cd4d0
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Ign:2 http://rpms.litespeedtech.com/debian bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://rpms.litespeedtech.com/debian bionic Release
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1334 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1413 kB]
Fetched 3000 kB in 19s (159 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libpq5
The following NEW packages will be installed:
libpq5 lsphp74-pgsql
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 164 kB of archives.
After this operation, 585 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
ERROR: Service 'litespeed' failed to build: The command '/bin/sh -c apt-get update && apt-get install lsphp74-pgsql' returned a non-zero code: 1
[root@myserver ols-docker-env]#
I'm following step by step in this tutorial
https://github.com/litespeedtech/ols-docker-env#customization
It's my costum/Dockerfile
FROM litespeedtech/openlitespeed:latest
RUN apt-get update && apt-get install lsphp74-pgsql
Any help is much appreciated!
Best Regards
Lars Hagen commented
Hi @denjakah,
Thank you for your message.
It appears that you forgot to add -Y
to apt-get install lsphp74-pgsql
The full Dockerfile should look like this
FROM litespeedtech/openlitespeed:latest
RUN apt-get update && apt-get install lsphp74-pgsql -Y
We will update the documentation to include the -Y
Let me know if this solved it for you.
Heden commented
Wow Great! 👍
It's success now
I really appreciate this answer
thank you @lars-hagen
[root@myserver ols-docker-env]# docker-compose up --build
Building litespeed
Step 1/2 : FROM litespeedtech/openlitespeed:latest
---> 30d522c28646
Step 2/2 : RUN apt-get update && apt-get install lsphp74-pgsql -y
---> Using cache
---> cecb8a176bc0
Successfully built cecb8a176bc0
Successfully tagged litespeedtech/openlitespeed:1.6.13-lsphp74
Starting ols-docker-env_phpmyadmin_1 ... done
Recreating ols-docker-env_litespeed_1 ... done
Starting ols-docker-env_mysql_1 ... done
Attaching to ols-docker-env_mysql_1, ols-docker-env_phpmyadmin_1, ols-docker-env_litespeed_1
phpmyadmin_1 |
phpmyadmin_1 | Welcome to the Bitnami phpmyadmin container
phpmyadmin_1 | Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-phpmyadmin
phpmyadmin_1 | Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-phpmyadmin/issues
phpmyadmin_1 |