Coder Social home page Coder Social logo

Comments (14)

petk avatar petk commented on June 18, 2024 2

Certbot via a separate image.

from docker-php.

KingYes avatar KingYes commented on June 18, 2024 1

If I run this docker by your example, I get "true". But the same docker in Kubernetes I get "false". :(

from docker-php.

KingYes avatar KingYes commented on June 18, 2024 1

Okay, it's like a cache. I clear the cache from my images, and it's working. Thank you !

Sorry about that.

from docker-php.

petk avatar petk commented on June 18, 2024

Probably because there is no bash on that docker container. Many images, including these use only POSIX shell:

kubectl exec -it dockername-XXX-YYY -- /bin/sh

from docker-php.

KingYes avatar KingYes commented on June 18, 2024

Hey,

Can you change the base OS you use in this docker?

I need apt-get for example to install extra packages..

from docker-php.

insekticid avatar insekticid commented on June 18, 2024

from docker-php.

petk avatar petk commented on June 18, 2024

Alpine's packages: https://pkgs.alpinelinux.org/packages

To use a Debian based distribution, yes, a completely new Dockerfile is required for a base image. Otherwise, Alpine today provides most things already except software that require glibc specifically. Alpine is based on musl (the system C headers and stuff) and that causes some incompatibilities with software that is not made portable enough yet.

from docker-php.

KingYes avatar KingYes commented on June 18, 2024

Okay, thanks !

But for now I can't get mysqli ext to work. In this code:

var_dump(function_exists('mysqli_connect'));

I get false.

My docker file is:

FROM phpearth/php:7.2-nginx

RUN apk add --no-cache php7.2-sodium php7.2-intl php7.2-pdo_mysql bash wget

What I miss?

from docker-php.

petk avatar petk commented on June 18, 2024

@KingYes

the php7.2-mysqli package...

from docker-php.

KingYes avatar KingYes commented on June 18, 2024

It's the same. Can you show your own docker for that?

Maybe need to reload the nginx after this package get installed?

from docker-php.

petk avatar petk commented on June 18, 2024
FROM phpearth/php:7.2-nginx

RUN apk add --no-cache php7.2-sodium php7.2-intl php7.2-pdo_mysql php7.2-mysqli bash wget

To build your customized Docker image:

docker build -t myvendor/myapp -f Dockerfile .  

To run Docker container from the built image:

docker run -it --rm myvendor/myapp php -r "var_dump(function_exists('mysqli_connect'));"

I think this should work ok... But we need to bump also PHP versions in the docker hub to have the latest PHP versions...

P.S: it might be that you need to refresh your image once you've installed a new package... Common issuee with Docker sometimes...

from docker-php.

petk avatar petk commented on June 18, 2024

I'll check it out, thanks for reporting then... Do you maybe have any direct steps to reproduce this?

from docker-php.

petk avatar petk commented on June 18, 2024

In case of issues, just ask.. Thanks.

from docker-php.

KingYes avatar KingYes commented on June 18, 2024

Sorry for that, but what is the best way to install SSL on this docker?

from docker-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.