From 7d28b7bf4b8b6ba08451b5f4b626f2ad16006841 Mon Sep 17 00:00:00 2001 From: simojenki Date: Wed, 22 Dec 2021 16:29:20 +1100 Subject: [PATCH] Use debian bullseye base images for better arm support, build only amd64 * arm/v7 images --- .github/workflows/ci.yml | 4 ++-- Dockerfile | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 391d83c..dc5cd9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-node@v1 with: - node-version: 16.6.x + node-version: '16' - run: yarn install - @@ -62,7 +62,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm/v7 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 51b9b8f..59961e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.6-alpine as build +FROM node:16-bullseye as build WORKDIR /bonob @@ -17,23 +17,28 @@ COPY .yarnrc.yml . COPY .yarn/releases ./.yarn/releases ENV JEST_TIMEOUT=30000 +ENV DEBIAN_FRONTEND=noninteractive -RUN apk add --no-cache --update --virtual .gyp \ - vips-dev \ +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y install --no-install-recommends \ + libvips-dev \ python3 \ make \ git \ g++ && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ yarn install --immutable && \ yarn gitinfo && \ yarn test --no-cache && \ yarn build - -FROM node:16.6-alpine +FROM node:16-bullseye ENV BNB_PORT=4534 +ENV DEBIAN_FRONTEND=noninteractive EXPOSE $BNB_PORT @@ -48,7 +53,11 @@ COPY --from=build /bonob/.gitinfo ./ COPY web ./web COPY src/Sonoswsdl-1.19.4-20190411.142401-3.wsdl ./src/Sonoswsdl-1.19.4-20190411.142401-3.wsdl -RUN apk add --no-cache --update vips +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y install --no-install-recommends libvips && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* USER nobody WORKDIR /bonob/src