chore: import base docker images from the Docker repo

pull/231/head
Romain 3 years ago
parent fd1a0069a5
commit 9636204203

@ -0,0 +1,48 @@
name: Publish base Docker images
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [10, 12, 14]
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
-
name: Publish thumbsup/runtime
uses: docker/build-push-action@v2
with:
context: docker
file: ./docker/Dockerfile.runtime
build-args: NODE_VERSION=${{ matrix.nodejs }}
platforms: linux/amd64,linux/arm64
tags: ghcr.io/thumbsup/runtime:node-${{ matrix.nodejs }}
push: true
-
name: Publish thumbsup/build
uses: docker/build-push-action@v2
with:
context: docker
file: ./docker/Dockerfile.build
build-args: NODE_VERSION=${{ matrix.nodejs }}
platforms: linux/amd64,linux/arm64
tags: ghcr.io/thumbsup/build:node-${{ matrix.nodejs }}
push: true

@ -0,0 +1,19 @@
# -------------------------------------------------
# This Docker image is used to speed up the builds
# -------------------------------------------------
ARG NODE_VERSION
# Node.js + runtime dependencies
FROM ghcr.io/thumbsup/runtime:node-${NODE_VERSION}
# Metadata
LABEL org.opencontainers.image.source https://github.com/thumbsup/thumbsup
# Standard build dependencies for npm install
RUN apk add --no-cache git make g++ python bash
# Pre-install expensive dependencies
WORKDIR /app
RUN npm init -y
RUN npm install better-sqlite3

@ -0,0 +1,17 @@
# -------------------------------------------------
# This Docker image contains all the typical
# runtime dependencies for thumbsup, including
# exiftool, imagemagick, ffmpeg, gifsicle...
# -------------------------------------------------
ARG NODE_VERSION
FROM node:${NODE_VERSION}-alpine as base
# Metadata
LABEL org.opencontainers.image.source https://github.com/thumbsup/thumbsup
# Add libraries
RUN apk add --update --no-cache libgomp zlib libpng libjpeg-turbo libwebp tiff lcms2 x265 libde265 libheif
# Add external programs
RUN apk add --update --no-cache ffmpeg imagemagick graphicsmagick exiftool gifsicle zip
Loading…
Cancel
Save