Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> docker php7.0-intl
trzczy
post 14.02.2018, 18:33:10
Post #1





Grupa: Zarejestrowani
Postów: 460
Pomógł: 49
Dołączył: 5.06.2011

Ostrzeżenie: (0%)
-----


Potrzebny by mi był taki pakiet apache2.4, php7.0, php7.0-intl dla debiana jessie. W Dockerfile jest coś takiego
  1. FROM php:7.0-apache
Czyli widać, jaki image jest pobierany. Kiedy dodaję w Dockerfile RUN apt install php7.0-intl, otrzymuję komunikat, że nie można znaleźć tego rozszerzenia. Jak byście szukali rozwiązania?
Dziękuję z góry

Ten post edytował trzczy 14.02.2018, 18:34:11
Go to the top of the page
+Quote Post
com
post 14.02.2018, 19:47:45
Post #2





Grupa: Zarejestrowani
Postów: 3 032
Pomógł: 366
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


https://discuss.circleci.com/t/how-to-insta...-php7-0/16144/4
Go to the top of the page
+Quote Post
trzczy
post 14.02.2018, 22:24:50
Post #3





Grupa: Zarejestrowani
Postów: 460
Pomógł: 49
Dołączył: 5.06.2011

Ostrzeżenie: (0%)
-----


Kiszka
  1. ---> Running in ad02e36f020a
  2. deb <a href="http://security.debian.org/debian-security" target="_blank">http://security.debian.org/debian-security</a> jessie/updates main
  3. deb <a href="http://ftp.de.debian.org/debian" target="_blank">http://ftp.de.debian.org/debian</a> jessie main
  4. deb <a href="http://packages.dotdeb.org" target="_blank">http://packages.dotdeb.org</a> jessie all
  5. deb-src <a href="http://packages.dotdeb.org" target="_blank">http://packages.dotdeb.org</a> jessie all
  6. deb <a href="http://deb.debian.org/debian" target="_blank">http://deb.debian.org/debian</a> jessie main
  7. deb <a href="http://deb.debian.org/debian" target="_blank">http://deb.debian.org/debian</a> jessie-updates main
  8. deb <a href="http://security.debian.org" target="_blank">http://security.debian.org</a> jessie/updates main
  9.  
  10. deb <a href="http://security.debian.org/debian-security" target="_blank">http://security.debian.org/debian-security</a> jessie/updates main
  11. deb <a href="http://ftp.de.debian.org/debian" target="_blank">http://ftp.de.debian.org/debian</a> jessie main
  12. deb <a href="http://packages.dotdeb.org" target="_blank">http://packages.dotdeb.org</a> jessie all
  13. deb-src <a href="http://packages.dotdeb.org" target="_blank">http://packages.dotdeb.org</a> jessie all
  14. gpg: directory `/root/.gnupg' created
  15. gpg: new configuration file `/root/.gnupg/gpg.conf' created
  16. gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
  17. gpg: keyring `/root/.gnupg/secring.gpg' created
  18. gpg: keyring `/root/.gnupg/pubring.gpg' created
  19. gpg: requesting key 89DF5277 from hkp server keys.gnupg.net
  20. gpg: /root/.gnupg/trustdb.gpg: trustdb created
  21. gpg: key 89DF5277: public key "Guillaume Plessis <gui@dotdeb.org>" imported
  22. gpg: no ultimately trusted keys found
  23. gpg: Total number processed: 1
  24. gpg: imported: 1 (RSA: 1)
  25. OK
  26. OK
  27. Get:1 <a href="http://packages.dotdeb.org" target="_blank">http://packages.dotdeb.org</a> jessie InRelease [9871 B]
  28. Get:2 <a href="http://security.debian.org" target="_blank">http://security.debian.org</a> jessie/updates InRelease [63.1 kB]
  29. Get:3 <a href="http://security.debian.org" target="_blank">http://security.debian.org</a> jessie/updates InRelease [63.1 kB]
  30. Ign <a href="http://ftp.de.debian.org" target="_blank">http://ftp.de.debian.org</a> jessie InRelease
  31. Get:4 <a href="http://ftp.de.debian.org" target="_blank">http://ftp.de.debian.org</a> jessie Release.gpg [2434 B]
  32. Get:5 <a href="http://packages.dotdeb.org" target="_blank">http://packages.dotdeb.org</a> jessie/all Sources [48.3 kB]
  33. Get:6 <a href="http://ftp.de.debian.org" target="_blank">http://ftp.de.debian.org</a> jessie Release [148 kB]
  34. Ign <a href="http://deb.debian.org" target="_blank">http://deb.debian.org</a> jessie InRelease
  35. Get:7 <a href="http://deb.debian.org" target="_blank">http://deb.debian.org</a> jessie-updates InRelease [145 kB]
  36. Get:8 <a href="http://packages.dotdeb.org" target="_blank">http://packages.dotdeb.org</a> jessie/all amd64 Packages [261 kB]
  37. Get:9 <a href="http://security.debian.org" target="_blank">http://security.debian.org</a> jessie/updates/main amd64 Packages [608 kB]
  38. Get:10 <a href="http://ftp.de.debian.org" target="_blank">http://ftp.de.debian.org</a> jessie/main amd64 Packages [9064 kB]
  39. Get:11 <a href="http://deb.debian.org" target="_blank">http://deb.debian.org</a> jessie Release.gpg [2434 B]
  40. Get:12 <a href="http://deb.debian.org" target="_blank">http://deb.debian.org</a> jessie-updates/main amd64 Packages [23.1 kB]
  41. Get:13 <a href="http://deb.debian.org" target="_blank">http://deb.debian.org</a> jessie Release [148 kB]
  42. Get:14 <a href="http://security.debian.org" target="_blank">http://security.debian.org</a> jessie/updates/main amd64 Packages [608 kB]
  43. Get:15 <a href="http://deb.debian.org" target="_blank">http://deb.debian.org</a> jessie/main amd64 Packages [9064 kB]
  44. Fetched 20.3 MB in 1min 9s (290 kB/s)
  45. Reading package lists...
  46. Reading package lists...
  47. Building dependency tree...
  48. Reading state information...
  49. Package php7.0-intl is not available, but is referred to by another package.
  50. This may mean that the package is missing, has been obsoleted, or
  51. is only available from another source
  52.  
  53. E: Package 'php7.0-intl' has no installation candidate
  54. ERROR:

Ale dzięki. Pozdrawiam
Go to the top of the page
+Quote Post
by_ikar
post 15.02.2018, 08:36:31
Post #4





Grupa: Zarejestrowani
Postów: 1 798
Pomógł: 307
Dołączył: 13.05.2009
Skąd: Gubin/Wrocław

Ostrzeżenie: (0%)
-----


Kod
FROM php:7.0-apache

RUN apt-get update && \
    apt-get install -y zlib1g-dev libicu-dev g++ && \
    docker-php-ext-install intl && \
    docker-php-ext-enable intl


Ten obraz wymaga pewnych "kroków" instalacyjnych, co jest opisane: https://hub.docker.com/_/php/

Cytat
How to install more PHP extensions
We provide the helper scripts docker-php-ext-configure, docker-php-ext-install, and docker-php-ext-enable to more easily install PHP extensions.


więc całkowicie źle do tego się zabierałeś, jednocześnie masz brak dostępnych "pakietów" dlatego że lista pakietów nie została zaktualizowana, zawsze się na początku aktualizuje listę pakietów via:

Kod
apt-get update


Druga sprawa że nie zainstalowałbyś w taki sposób tego pakietu, dlatego że ten obraz jest minimalny i do instalacji tego pakietu potrzebujesz dodatkowe rzeczy, między innymi g++ żeby pakiet skompilować.
Go to the top of the page
+Quote Post
trzczy
post 15.02.2018, 11:38:42
Post #5





Grupa: Zarejestrowani
Postów: 460
Pomógł: 49
Dołączył: 5.06.2011

Ostrzeżenie: (0%)
-----


Super dzięki! docker-php-ext-install okazało się kluczem do rozwiązania. Jeśli idzie o apt update, to było na początku w Dockerfile, więc coś tam, coś tam kumam wink.gif

Z ciekawości poeliminowałem nadmiar linii w Dockerfile metodą prób i błędów, i okazało się, że to kwestia 1 biblioteki, w przypadku tego imidżu:
  1. FROM php:7.0-apache
  2. RUN apt-get update \
  3. && apt-get install -y \
  4. libicu-dev \
  5. && docker-php-ext-install \
  6. intl
  7. WORKDIR /var/www
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.03.2024 - 18:28