mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 14:37:26 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a935a0eef | ||
|
|
ff897d568f | ||
|
|
b0bb0ffd25 | ||
|
|
3902b40bc1 | ||
|
|
29e2d93e59 | ||
|
|
b7aea66e62 |
57
.github/workflows/build-image-v5.yml
vendored
Normal file
57
.github/workflows/build-image-v5.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: Build Container Image
|
||||||
|
|
||||||
|
# When its time to do a release do a full cross platform build for all supported
|
||||||
|
# architectures and push all of them to Docker Hub.
|
||||||
|
# Only trigger on semver shaped tags.
|
||||||
|
# Ref: https://github.com/metcalfc/docker-action-examples/blob/main/.github/workflows/release.yml
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "alpine/5/**"
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "alpine/5/**"
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
with:
|
||||||
|
platforms: all
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
|
context: ./alpine/5/
|
||||||
|
build-args: INVOICENINJA_VERSION=5-stable
|
||||||
|
target: prod
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: invoiceninja/invoiceninja:cache
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||||
|
|
||||||
|
- name: Move cache
|
||||||
|
run: |
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Publish Releases to Hub
|
name: Publish Container Image
|
||||||
|
|
||||||
# When its time to do a release do a full cross platform build for all supported
|
# When its time to do a release do a full cross platform build for all supported
|
||||||
# architectures and push all of them to Docker Hub.
|
# architectures and push all of them to Docker Hub.
|
||||||
@@ -44,13 +44,13 @@ jobs:
|
|||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
# - name: Cache Docker layers
|
- name: Cache Docker layers
|
||||||
# uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# with:
|
with:
|
||||||
# path: /tmp/.buildx-cache
|
path: /tmp/.buildx-cache
|
||||||
# key: ${{ runner.os }}-buildx-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/**') }}
|
||||||
# restore-keys: |
|
restore-keys: |
|
||||||
# ${{ runner.os }}-buildx-
|
${{ runner.os }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/**') }}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
@@ -70,8 +70,8 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
cache-from: invoiceninja/invoiceninja:${{ steps.prep.outputs.major }}
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=inline
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
||||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
||||||
[](https://artifacthub.io/packages/search?repo=invoiceninja)
|
[](https://artifacthub.io/packages/search?repo=invoiceninja)
|
||||||
|
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml) [](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
# Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ RUN npm install --production \
|
|||||||
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
||||||
|
|
||||||
# Prepare php image
|
# Prepare php image
|
||||||
FROM php:${PHP_VERSION}-fpm-alpine as prod
|
FROM php:${PHP_VERSION}-fpm-alpine3.13 as prod
|
||||||
ARG INVOICENINJA_VERSION
|
ARG INVOICENINJA_VERSION
|
||||||
ARG BAK_STORAGE_PATH
|
ARG BAK_STORAGE_PATH
|
||||||
ARG BAK_PUBLIC_PATH
|
ARG BAK_PUBLIC_PATH
|
||||||
@@ -88,8 +88,7 @@ WORKDIR /var/www/app
|
|||||||
|
|
||||||
# Do not remove this ENV
|
# Do not remove this ENV
|
||||||
ENV IS_DOCKER true
|
ENV IS_DOCKER true
|
||||||
RUN /usr/local/bin/composer install --no-dev --quiet \
|
RUN /usr/local/bin/composer install --no-dev --quiet
|
||||||
&& rm .env
|
|
||||||
|
|
||||||
# Override the environment settings from projects .env file
|
# Override the environment settings from projects .env file
|
||||||
ENV APP_ENV production
|
ENV APP_ENV production
|
||||||
|
|||||||
1
alpine/5/cache_buster
Normal file
1
alpine/5/cache_buster
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fri Jul 2 7:33:22 +00 2021
|
||||||
Reference in New Issue
Block a user