mirror of
https://github.com/bitinflow/bpkg-images.git
synced 2026-03-13 13:45:54 +00:00
Update docs and jobs
This commit is contained in:
32
.github/workflows/laravel.yml
vendored
32
.github/workflows/laravel.yml
vendored
@@ -1,8 +1,12 @@
|
||||
on: push
|
||||
on: [push, pull_request]
|
||||
name: Build
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build Laravel Images
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runtime: [ laravel:8.0-octane, laravel:8.1-octane ]
|
||||
name: "bpkg.io/${{ matrix.runtime }}"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
@@ -16,17 +20,27 @@ jobs:
|
||||
registry: bpkg.io
|
||||
username: k3s
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build and push bpkg.io/laravel:8.0-octane
|
||||
- name: Build and push bpkg.io/${{ matrix.runtime }}
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./runtimes/laravel:8.0-octane/Dockerfile
|
||||
file: ./runtimes/${{ matrix.runtime }}/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
|
||||
bpkg.io/${{ matrix.runtime }}
|
||||
- name: Build and push bpkg.io/${{ matrix.runtime }}-develop
|
||||
if: github.ref == 'refs/heads/develop'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./runtimes/${{ matrix.runtime }}/Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
bpkg.io/${{ matrix.runtime }}-develop
|
||||
|
||||
33
README.md
33
README.md
@@ -1,2 +1,31 @@
|
||||
# bpkg-laravel
|
||||
bpkg.io/laravel
|
||||
# bpkg.io Images
|
||||
|
||||
The bkg.io images are a collection of images that are used as a base for building other images. Mostly they are used as
|
||||
base images for our web projects.
|
||||
|
||||
## Supported Images
|
||||
|
||||
| Image | Version | Description | Architecture | Supported |
|
||||
| ------ | ------- | ----------- | ------------ | ---------- |
|
||||
| bpkg.io/laravel | 8.0-octane | PHP image containing all extensions for a laravel octane app. | amd64, arm64 | yes |
|
||||
| bpkg.io/laravel | 8.0-octane-develop | Development build. | amd64, arm64 | no |
|
||||
| bpkg.io/laravel | 8.1-octane | PHP image containing all extensions for a laravel octane app. | amd64, arm64 | yes |
|
||||
| bpkg.io/laravel | 8.1-octane-develop | Development build. | amd64, arm64 | no |
|
||||
|
||||
## Concepts
|
||||
|
||||
### Default Working Directory
|
||||
|
||||
For web projects the default working directory is `/var/www/html`. This applies to all `bpkg.io/laravel` images.
|
||||
|
||||
## Usage
|
||||
|
||||
The following dockerfile show the usage of the bpkg.io/laravel image. Per default, it uses the
|
||||
command `php artisan octane:start --host 0.0.0.0` to start the application and expose the application on port 8000.
|
||||
|
||||
```dockerfile
|
||||
FROM bpkg.io/laravel:8.0-octane
|
||||
|
||||
# copy all your project files to the /var/www/html folder
|
||||
COPY . /var/www/html
|
||||
```
|
||||
20
runtimes/laravel:8.1-octane/Dockerfile
Normal file
20
runtimes/laravel:8.1-octane/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM php:8.1-cli-alpine3.15
|
||||
|
||||
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"]
|
||||
Reference in New Issue
Block a user