Update docker image due to missing/depracated dependencies#4190
Update docker image due to missing/depracated dependencies#4190antonmedv merged 1 commit intodeployphp:masterfrom
Conversation
Dockerfile
Outdated
| @@ -1,8 +1,8 @@ | |||
| FROM php:8.4-cli-alpine | |||
| FROM php:8.5-cli-alpine | |||
There was a problem hiding this comment.
I removed this and amended this to the pull request commit
|
Why do we need "linux-headers" & "curl-dev"? |
|
Hi @antonmedv, linux-headersThe "linux-headers" is necessary to compile the socket extension for PHP, otherwise the docker build ends up with this error: /usr/src/php/ext/sockets/sockets.c:58:12: fatal error: linux/sock_diag.h: No such file or directory` The file necessary is part of the linux-header package, see: linux/sock_diag.h curl-devSimiliar issue happens when you try to compile the curl PHP extension ( mbstringThis can be dropped as the extension is enabled by default in the base image already mcryptThe extension is deprecated and shouldn't be used anymore, it fails to be installed with pecl or docker-php-ext-install, by searching the code I didn't see a hard dependency on this anyway or did I oversee something here? PHP 8.5Should I just drop/amend this from this commit? (It works fine in the image I built) Greetings |
There was a problem hiding this comment.
Pull request overview
Updates the project’s Docker image build to resolve missing/deprecated dependencies so the published Deployer container can build and run successfully again.
Changes:
- Adds Alpine packages needed to compile required PHP extensions (
linux-headers,curl-dev). - Updates the installed PHP extensions list to ensure
sockets(and others) are built into the image.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| RUN apk update && apk add --no-cache linux-headers bash git openssh-client rsync zip unzip libzip-dev curl-dev | ||
|
|
||
| RUN docker-php-ext-install mbstring mcrypt pcntl sockets curl zip | ||
| RUN docker-php-ext-install pcntl sockets curl zip |
There was a problem hiding this comment.
@featdd looks like --no-cache is enought. Could you please verify?
There was a problem hiding this comment.
@antonmedv ah not only that, it seems curl is also already available by default.
I just let codex do some further optimizations and could save 13MB in the final image, see: featdd/deployerphp
I'll create another pull request
The current docker image fails because of the missing sockets extension for PHP.
For successfull build and execution "linux-headers" & "curl-dev" needed to be added.
I build a custom image for v8.0.0-rc, see featdd/deployerphp:v8.0.0-rc and now it works fine for me.