-
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.
- Loading branch information
0 parents
commit 692ceae
Showing
3 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-docker-hub | ||
|
||
name: Publish Docker Image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker Image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: nicoverbruggen/php83-alpine | ||
|
||
- name: Build and push Docker Image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 @@ | ||
FROM php:8.3-alpine | ||
# https://hub.docker.com/_/php/tags?page=1&name=8.3-alpine | ||
|
||
# Install PHP modules and clean up | ||
RUN apk add --no-cache $PHPIZE_DEPS \ | ||
imagemagick-dev icu-dev zlib-dev jpeg-dev libpng-dev libzip-dev libgomp linux-headers; \ | ||
docker-php-ext-configure gd --with-jpeg; \ | ||
docker-php-ext-install intl pcntl gd exif zip mysqli pgsql pdo pdo_mysql pdo_pgsql bcmath opcache; \ | ||
pecl install xdebug; \ | ||
docker-php-ext-enable xdebug; \ | ||
echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ | ||
pecl install imagick; \ | ||
docker-php-ext-enable imagick; \ | ||
apk del $PHPIZE_DEPS; \ | ||
rm -rf /tmp/pear; | ||
|
||
# Install other dependencies | ||
RUN apk add --no-cache git curl sqlite nodejs npm nano |
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,27 @@ | ||
# php83-alpine | ||
|
||
## What is this? | ||
|
||
This is a custom build based on PHP 8.3's Alpine docker image, with changes to make Laravel back-end testing easily possible. | ||
|
||
## Quick start | ||
|
||
In order to build and then test the container: | ||
|
||
docker buildx build . --platform linux/amd64 -t nicoverbruggen/php83-alpine \ | ||
&& docker run -it nicoverbruggen/php83-alpine sh | ||
|
||
You may omit the `--platform` flag if you wish to build a container for your own architecture, but there may be issues with dependencies. | ||
|
||
## Automatic builds | ||
|
||
The automatically build the container and have it pushed, you must: | ||
|
||
* Tag the commit you wish to build | ||
* Create a new release with said tag | ||
|
||
The Docker action will automatically build the release and push it under that tag to Docker Hub. | ||
|
||
## Where can I find it? | ||
|
||
You can find the image on Docker Hub here: https://hub.docker.com/r/nicoverbruggen/php83-alpine. |