Skip to content

Instantly share code, notes, and snippets.

@mateusjatenee
mateusjatenee / vapor.Dockerfile
Created April 28, 2024 20:04
Vapor Dockerfile to install Ghostscript and Imagick while the PECL package is broken
FROM laravelphp/vapor:php83
ARG IMAGICK_VERSION=3.7.0
RUN apk --update add \
ghostscript && \
rm /var/cache/apk/*
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/refs/tags/${IMAGICK_VERSION}.tar.gz \
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
function c {
git add --all
git commit -m $1
}
function p {
git add --all
git commit -m $1
<?php
class BookRepository
{
protected $book;
public function __construct(Book $book)
{
$this->book = $book;
}