Add laravel image

This commit is contained in:
René Preuß
2021-12-05 14:03:19 +01:00
parent 9e658416bf
commit 21cbb5240c
2 changed files with 52 additions and 0 deletions

32
.github/workflows/laravel.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
on: push
name: Build
jobs:
deploy:
name: Build Laravel Images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: bpkg.io
username: k3s
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push bpkg.io/laravel:8.0-octane
uses: docker/build-push-action@v2
with:
context: .
file: ./runtimes/laravel:8.0-octane/Dockerfile
platforms: |
linux/amd64
linux/arm/v7
push: true
build-args: |
CICD_GIT_COMMIT=${{ steps.slug.outputs.sha8 }}
tags: |
bpkg.io/laravel:latest
bpkg.io/laravel:8.0-octane

View File

@@ -0,0 +1,20 @@
FROM php:8.0-cli-alpine3.13
WORKDIR /var/www/html
# STSTEM: Install required packages
RUN apk --no-cache upgrade && \
apk --no-cache add bash git sudo openssh libxml2-dev postgresql-dev oniguruma-dev autoconf gcc g++ make npm freetype-dev libjpeg-turbo-dev libpng-dev libzip-dev
# COMPOSER: install binary and prestissimo
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# PHP: install extensions
RUN pecl channel-update pecl.php.net
RUN pecl install ssh2 swoole
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install mbstring xml pcntl gd zip sockets pdo pdo_pgsql pdo_mysql bcmath
RUN docker-php-ext-enable mbstring xml gd zip swoole pcntl sockets bcmath pdo pdo_pgsql pdo_mysql
EXPOSE 8000
CMD ["php","artisan","octane:start", "--host=0.0.0.0"]