Skip to content

Commit

Permalink
build: add Docker base images
Browse files Browse the repository at this point in the history
Related to #83
  • Loading branch information
JoosepAlviste committed Feb 7, 2024
1 parent 371af64 commit 5f74ac7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/docker-base-images/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM node:20-alpine AS base

RUN npm i -g pnpm@8
8 changes: 8 additions & 0 deletions packages/docker-base-images/Dockerfile.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:20-alpine AS base

RUN npm i -g pnpm@8

# Install dependencies for compiling node-gyp (since there is no pre-built
# binary for Alpine)
# https://stackoverflow.com/a/59538284/7044732
RUN apk add g++ make python3
17 changes: 17 additions & 0 deletions packages/docker-base-images/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "@serieslist/docker-base-images",
"targets": {
"build:docker": {
"executor": "nx:run-commands",
"options": {
"cwd": "packages/docker-base-images",
"commands": [
"docker buildx build --push --cache-to type=gha,mode=max,scope=base --cache-from type=gha,scope=base -t ghcr.io/joosepalviste/serieslist-base:latest -f Dockerfile.base .",
"docker buildx build --push --cache-to type=gha,mode=max,scope=dependencies --cache-from type=gha,scope=dependencies -t ghcr.io/joosepalviste/serieslist-base:latest -f Dockerfile.dependencies ."
],
"parallel": true
}
}
}
}

0 comments on commit 5f74ac7

Please sign in to comment.