Skip to content

Commit ac7013d

Browse files
authored
chore(docker): bump flex docker to php8.5 (#628)
* chore(docker): bump flex docker to php8.5 * builds apline 3.23 * build 811 aplpine 3.23, php 8.5 * 8.5 fixes * fix hardcoded tests * use future proof pattern * typo * 3.23 is now default flex * php8.5 for 8.1.0 * fix comment * restore php-session mistakenly removed, nice spot Brady * default to php8.5 in benchmark test * fix comment for is_default_flex * use ubuntu 24 with build flex workflow
1 parent 235e5be commit ac7013d

10 files changed

Lines changed: 255 additions & 135 deletions

File tree

.github/workflows/build-322.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ name: Flex 3.22 Dockers Build
1212
#
1313
# The is_default_flex environment variable is used to determine if this is the default flex image.
1414
#
15-
# THIS ALPINE 3.22 VERSION IS TAGGED AS openemr/openemr:flex (THE DEFAULT FLEX IMAGE SINCE is_default_flex IS TRUE)
16-
# (ENSURE TO MAKE THIS (is_default_flex) FALSE WHEN A NEW ALPINE VERSION TAKES OVER AS THE DEFAULT!)
1715

1816
on:
1917
workflow_dispatch:
@@ -22,7 +20,7 @@ jobs:
2220
build:
2321
uses: ./.github/workflows/build-flex-core.yml
2422
with:
25-
is_default_flex: true
23+
is_default_flex: false
2624
alpine_version: "3.22"
2725
php_versions: '["8.2", "8.3", "8.4"]'
2826
php_default: "8.4"

.github/workflows/build-323.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Flex 3.23 Dockers Build
2+
3+
# This workflow builds the OpenEMR Flex Docker images with Alpine 3.23 and PHP versions 8.3, 8.4, and 8.5.
4+
# And in this configuration will create following dockers (and tags):
5+
# PHP 8.3: openemr/openemr:flex-3.23-php-8.3
6+
# PHP 8.4: openemr/openemr:flex-3.23-php-8.4
7+
# PHP 8.5: openemr/openemr:flex-3.23-php-8.5, openemr/openemr:flex-3.23, openemr/openemr:flex
8+
#
9+
# php_versions is a JSON array of PHP versions to build.
10+
#
11+
# The php_default will determine the default PHP version (ie. above tag without a php version).
12+
#
13+
# The is_default_flex environment variable is used to determine if this is the default flex image.
14+
#
15+
# THIS ALPINE 3.23 VERSION IS TAGGED AS openemr/openemr:flex (THE DEFAULT FLEX IMAGE SINCE is_default_flex IS TRUE)
16+
# (ENSURE TO MAKE THIS (is_default_flex) FALSE WHEN A NEW ALPINE VERSION TAKES OVER AS THE DEFAULT!)
17+
18+
on:
19+
workflow_dispatch:
20+
21+
jobs:
22+
build:
23+
uses: ./.github/workflows/build-flex-core.yml
24+
with:
25+
is_default_flex: true
26+
alpine_version: "3.23"
27+
php_versions: '["8.3", "8.4", "8.5"]'
28+
php_default: "8.5"
29+
secrets: inherit

.github/workflows/build-flex-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
build:
2121
if: github.repository_owner == 'openemr' && github.repository == 'openemr/openemr-devops' && github.ref == 'refs/heads/master'
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-24.04
2323
strategy:
2424
matrix:
2525
php_version: ${{ fromJson(inputs.php_versions) }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This will run the OpenEMR flex dockers with Alpine 3.23 version. It will test the flex docker images in both
2+
# development (ie. dev) mode (codebase used from a shared volume) and production (ie. prod) mode (codebase collected via git).
3+
# - is_production_docker is required and needs to be false.
4+
# - alpine_versions is set to 3.23
5+
# - php_versions are set to 8.3, 8.4 and 8.5
6+
# - note not using the coverage settings (is_flex_coverage_docker, flex_coverage_php_version) in this workflow. see
7+
# test-flex-edge.yml for use of these settings.
8+
9+
name: OpenEMR Flex 3.23 Docker Test
10+
11+
on:
12+
push:
13+
branches:
14+
- master
15+
paths:
16+
- '.github/workflows/test-flex-323.yml'
17+
- 'docker/openemr/flex/**'
18+
- '.github/actions/test-actions-core/action.yml'
19+
- '.github/workflows/test-core.yml'
20+
pull_request:
21+
branches:
22+
- master
23+
paths:
24+
- '.github/workflows/test-flex-323.yml'
25+
- 'docker/openemr/flex/**'
26+
- '.github/actions/test-actions-core/action.yml'
27+
- '.github/workflows/test-core.yml'
28+
29+
jobs:
30+
build:
31+
uses: ./.github/workflows/test-core.yml
32+
with:
33+
is_production_docker: false
34+
alpine_version: "3.23"
35+
php_versions: '["8.3", "8.4", "8.5"]'

docker/openemr/8.1.0/Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
# ============================================================================
2222
# Alpine Linux version - centralized setting for easy updates
2323
# Note: This is NOT meant to be used as a build argument (unlike the flex series)
24-
ARG ALPINE_VERSION=3.22
24+
ARG ALPINE_VERSION=3.23
2525
FROM alpine:${ALPINE_VERSION} AS base
2626

2727
# PHP version configuration
2828
# Note: This is NOT meant to be used as a build argument (unlike the flex series)
2929
# Important: When updating PHP version, also update php.ini file to match
30-
ARG PHP_VERSION=8.4
30+
ARG PHP_VERSION=8.5
3131
ENV PHP_VERSION=${PHP_VERSION}
32-
# Create abbreviated version (e.g., "8.4" -> "84") for package naming
32+
# Create abbreviated version (e.g., "8.5" -> "85") for package naming
3333
ARG PHP_VERSION_ABBR=${PHP_VERSION//./}
3434
ENV PHP_VERSION_ABBR=${PHP_VERSION_ABBR}
3535

@@ -93,18 +93,16 @@ RUN apk add --no-cache \
9393
php${PHP_VERSION_ABBR}-gd \
9494
php${PHP_VERSION_ABBR}-iconv \
9595
php${PHP_VERSION_ABBR}-intl \
96-
php${PHP_VERSION_ABBR}-json \
9796
php${PHP_VERSION_ABBR}-ldap \
9897
php${PHP_VERSION_ABBR}-mbstring \
9998
php${PHP_VERSION_ABBR}-mysqli \
100-
"$(if [ "${PHP_VERSION}" = "8.2" ] || [ "${PHP_VERSION}" = "8.3" ] || [ "${PHP_VERSION}" = "8.4" ]; then echo php${PHP_VERSION_ABBR}-opcache; fi)" \
10199
php${PHP_VERSION_ABBR}-openssl \
102100
php${PHP_VERSION_ABBR}-pdo \
103101
php${PHP_VERSION_ABBR}-pdo_mysql \
104102
php${PHP_VERSION_ABBR}-pecl-apcu \
105103
php${PHP_VERSION_ABBR}-pecl-imagick \
106104
php${PHP_VERSION_ABBR}-phar \
107-
php${PHP_VERSION_ABBR}-redis \
105+
php${PHP_VERSION_ABBR}-pecl-redis \
108106
php${PHP_VERSION_ABBR}-session \
109107
php${PHP_VERSION_ABBR}-simplexml \
110108
php${PHP_VERSION_ABBR}-soap \

docker/openemr/8.1.0/php.ini

Lines changed: 64 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@
119119
; Development Value: 60 (60 seconds)
120120
; Production Value: 60 (60 seconds)
121121

122+
; mysqlnd.collect_memory_statistics
123+
; Default Value: Off
124+
; Development Value: On
125+
; Production Value: Off
126+
122127
; output_buffering
123128
; Default Value: Off
124129
; Development Value: 4096
125130
; Production Value: 4096
126131

127-
; register_argc_argv
128-
; Default Value: On
129-
; Development Value: Off
130-
; Production Value: Off
131-
132132
; request_order
133133
; Default Value: None
134134
; Development Value: "GP"
@@ -322,11 +322,6 @@ serialize_precision = -1
322322
; https://php.net/disable-functions
323323
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
324324

325-
; This directive allows you to disable certain classes.
326-
; It receives a comma-delimited list of class names.
327-
; https://php.net/disable-classes
328-
disable_classes =
329-
330325
; Colors for Syntax Highlighting mode. Anything that's acceptable in
331326
; <span style="color: ???????"> would work.
332327
; https://php.net/syntax-highlighting
@@ -433,6 +428,7 @@ max_input_vars = 3000
433428
; Maximum amount of memory a script may consume
434429
; https://php.net/memory-limit
435430
memory_limit = 512M
431+
max_memory_limit = -1
436432

437433
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
438434
; Error handling and logging ;
@@ -533,12 +529,6 @@ ignore_repeated_errors = Off
533529
; https://php.net/ignore-repeated-source
534530
ignore_repeated_source = Off
535531

536-
; If this parameter is set to Off, then memory leaks will not be shown (on
537-
; stdout or in the log). This is only effective in a debug compile, and if
538-
; error reporting includes E_WARNING in the allowed list
539-
; https://php.net/report-memleaks
540-
report_memleaks = On
541-
542532
; This setting is off by default.
543533
;report_zend_debug = 0
544534

@@ -617,6 +607,12 @@ report_memleaks = On
617607
; Development value: 0
618608
; Production value: 0
619609

610+
; This directive controls whether PHP will output the backtrace of fatal errors.
611+
; Default Value: On
612+
; Development Value: On
613+
; Production Value: On
614+
;fatal_error_backtraces = On
615+
620616
;;;;;;;;;;;;;;;;;
621617
; Data Handling ;
622618
;;;;;;;;;;;;;;;;;
@@ -666,12 +662,10 @@ request_order = "GP"
666662
; that were passed when the script was invoked. These arrays are extremely
667663
; useful when running scripts from the command line. When this directive is
668664
; enabled, registering these variables consumes CPU cycles and memory each time
669-
; a script is executed. For performance reasons, this feature should be disabled
670-
; on production servers.
671-
; Note: This directive is hardcoded to On for the CLI SAPI
672-
; Default Value: On
673-
; Development Value: Off
674-
; Production Value: Off
665+
; a script is executed. For security reasons, this feature should be disabled
666+
; for non-CLI SAPIs.
667+
; Note: This directive is ignored for the CLI SAPI
668+
; This directive is deprecated.
675669
; https://php.net/register-argc-argv
676670
register_argc_argv = Off
677671

@@ -738,7 +732,7 @@ default_charset = "UTF-8"
738732
;;;;;;;;;;;;;;;;;;;;;;;;;
739733

740734
; UNIX: "/path1:/path2"
741-
include_path = ".:/usr/share/php84"
735+
include_path = ".:/usr/share/php85"
742736
;
743737
; Windows: "\path1;\path2"
744738
;include_path = ".;c:\php\includes"
@@ -814,6 +808,12 @@ enable_dl = Off
814808
; https://php.net/fastcgi.impersonate
815809
;fastcgi.impersonate = 1
816810

811+
; Prevent decoding of SCRIPT_FILENAME when using Apache ProxyPass or
812+
; ProxyPassMatch. This should be used if script file paths are not stored
813+
; in an encoded format on the file system.
814+
; Default is 1.
815+
;fastcgi.script_path_encoded = 0
816+
817817
; Disable logging through FastCGI connection. PHP's default behavior is to enable
818818
; this feature.
819819
;fastcgi.logging = 0
@@ -916,8 +916,8 @@ default_socket_timeout = 60
916916
; Be sure to appropriately set the extension_dir directive.
917917
;
918918
;extension=bz2
919-
920919
;extension=curl
920+
;extension=exif
921921
;extension=ffi
922922
;extension=ftp
923923
;extension=fileinfo
@@ -927,7 +927,6 @@ default_socket_timeout = 60
927927
;extension=intl
928928
;extension=ldap
929929
;extension=mbstring
930-
;extension=exif ; Must be after mbstring as it depends on it
931930
;extension=mysqli
932931
;extension=odbc
933932
;extension=openssl
@@ -951,8 +950,6 @@ default_socket_timeout = 60
951950
;extension=xsl
952951
;extension=zip
953952

954-
;zend_extension=opcache
955-
956953
;;;;;;;;;;;;;;;;;;;
957954
; Module Settings ;
958955
;;;;;;;;;;;;;;;;;;;
@@ -1008,8 +1005,12 @@ cli_server.color = On
10081005
; This directive allows you to produce PHP errors when some error
10091006
; happens within intl functions. The value is the level of the error produced.
10101007
; Default is 0, which does not produce any errors.
1008+
; This directive is deprecated.
10111009
;intl.error_level = E_WARNING
1012-
;intl.use_exceptions = 0
1010+
; If enabled this directive indicates that when an error occurs within an
1011+
; intl function a IntlException should be thrown.
1012+
; Default is Off, which means errors need to be handled manually.
1013+
;intl.use_exceptions = On
10131014

10141015
[sqlite3]
10151016
; Directory pointing to SQLite3 extensions
@@ -1087,6 +1088,14 @@ mail.add_x_header = Off
10871088
; RFC 2822 non conformant MTA.
10881089
mail.mixed_lf_and_crlf = Off
10891090

1091+
; Control line ending mode for mail messages and headers.
1092+
; Possible values: "crlf" (default), "lf", "mixed", "os"
1093+
; - crlf: Use CRLF line endings
1094+
; - lf: Use LF line endings only (converts CRLF in message to LF)
1095+
; - mixed: Same as mail.mixed_lf_and_crlf = On
1096+
; - os: Use CRLF on Windows, LF on other systems
1097+
mail.cr_lf_mode = crlf
1098+
10901099
; The path to a log file that will log all mail() calls. Log entries include
10911100
; the full path of the script, line number, To address and headers.
10921101
;mail.log =
@@ -1156,10 +1165,7 @@ mysqli.allow_persistent = On
11561165
; https://php.net/mysqli.max-links
11571166
mysqli.max_links = -1
11581167

1159-
; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
1160-
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
1161-
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
1162-
; at MYSQL_PORT.
1168+
; Default port number for mysqli_connect().
11631169
; https://php.net/mysqli.default-port
11641170
mysqli.default_port = 3306
11651171

@@ -1168,15 +1174,15 @@ mysqli.default_port = 3306
11681174
; https://php.net/mysqli.default-socket
11691175
mysqli.default_socket =
11701176

1171-
; Default host for mysqli_connect() (doesn't apply in safe mode).
1177+
; Default host for mysqli_connect().
11721178
; https://php.net/mysqli.default-host
11731179
mysqli.default_host =
11741180

1175-
; Default user for mysqli_connect() (doesn't apply in safe mode).
1181+
; Default user for mysqli_connect().
11761182
; https://php.net/mysqli.default-user
11771183
mysqli.default_user =
11781184

1179-
; Default password for mysqli_connect() (doesn't apply in safe mode).
1185+
; Default password for mysqli_connect().
11801186
; Note that this is generally a *bad* idea to store passwords in this file.
11811187
; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
11821188
; and reveal this password! And of course, any users with read access to this
@@ -1196,6 +1202,9 @@ mysqlnd.collect_statistics = On
11961202

11971203
; Enable / Disable collection of memory usage statistics by mysqlnd which can be
11981204
; used to tune and monitor MySQL operations.
1205+
; Default Value: Off
1206+
; Development Value: On
1207+
; Production Value: Off
11991208
mysqlnd.collect_memory_statistics = Off
12001209

12011210
; Records communication from all extensions using mysqlnd to the specified log
@@ -1310,6 +1319,9 @@ session.use_cookies = 1
13101319
; https://php.net/session.cookie-secure
13111320
;session.cookie_secure =
13121321

1322+
; https://php.net/session.cookie-partitioned
1323+
;session.cookie_partitioned = 0
1324+
13131325
; This option forces PHP to fetch and use a cookie for storing and maintaining
13141326
; the session id. We encourage this operation as it's very helpful in combating
13151327
; session hijacking when not specifying and managing your own session id. It is
@@ -1769,6 +1781,15 @@ opcache.enable=1
17691781
; SHM reset. The default "" disables file based caching.
17701782
;opcache.file_cache=
17711783

1784+
; Enables or disables read-only mode for the second level cache directory.
1785+
; It should improve performance for read-only containers,
1786+
; when the cache is pre-warmed and packaged alongside the application.
1787+
; Best used with `opcache.validate_timestamps=0`, `opcache.enable_file_override=1`
1788+
; and `opcache.file_cache_consistency_checks=0`.
1789+
; Note: A cache generated with a different build of PHP, a different file path,
1790+
; or different settings (including which extensions are loaded), may be ignored.
1791+
;opcache.file_cache_read_only=0
1792+
17721793
; Enables or disables opcode caching in shared memory.
17731794
;opcache.file_cache_only=0
17741795

@@ -1840,6 +1861,14 @@ opcache.enable=1
18401861
; SSL stream context option.
18411862
;openssl.capath=
18421863

1864+
; The libctx is an OpenSSL library context. OpenSSL defines a default library
1865+
; context, but PHP OpenSSL also defines its own library context to avoid
1866+
; interference with other libraries using OpenSSL and to provide an independent
1867+
; context for each thread in ZTS. Possible values:
1868+
; "custom" - use a custom library context (default)
1869+
; "default" - use the default OpenSSL library context
1870+
;openssl.libctx=custom
1871+
18431872
[ffi]
18441873
; FFI API restriction. Possible values:
18451874
; "preload" - enabled in CLI scripts and preloaded files (default)

0 commit comments

Comments
 (0)