-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
php: Simplify the end-user installation with a helper script
Besides making the instructions simpler, this also improves the robustness of the Docker image, because we can adjust filenames and directory structure as necessary. The Debian Dockerfile has been synchronized with the Alpine one, embedded the SHA-256 hash of the regular downloads, instead of going through `apt`, as this simplifies the placement in the top-level `/tideways/` directory without unecessary duplication or complicated cleanup. The updated instructions are now as follows: Debian: COPY --from=ghcr.io/tideways/php:latest /tideways/ /tideways/ RUN docker-php-ext-enable --ini-name tideways.ini $(php /tideways/get-ext-path.php) Alpine: COPY --from=ghcr.io/tideways/php:alpine /tideways/ /tideways/ RUN docker-php-ext-enable --ini-name tideways.ini $(php /tideways/get-ext-path.php) The previous instructions are no longer valid, but they have not yet been documented.
- Loading branch information
Showing
5 changed files
with
74 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
$fullPath = sprintf( | ||
"%s/tideways-php%s-%d.%d%s.so", | ||
__DIR__, | ||
file_exists("/lib/apk/db/installed") ? "-alpine" : "", | ||
PHP_MAJOR_VERSION, | ||
PHP_MINOR_VERSION, | ||
PHP_ZTS ? "-zts" : "" | ||
); | ||
|
||
if (!\is_file($fullPath)) { | ||
fwrite(STDERR, "Unable to determine extension path: $fullPath"); | ||
exit(1); | ||
} | ||
|
||
echo $fullPath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
$fullPath = sprintf( | ||
"%s/tideways-php%s-%d.%d%s.so", | ||
__DIR__, | ||
file_exists("/lib/apk/db/installed") ? "-alpine" : "", | ||
PHP_MAJOR_VERSION, | ||
PHP_MINOR_VERSION, | ||
PHP_ZTS ? "-zts" : "" | ||
); | ||
|
||
if (!\is_file($fullPath)) { | ||
fwrite(STDERR, "Unable to determine extension path: $fullPath"); | ||
exit(1); | ||
} | ||
|
||
echo $fullPath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters