From 8b3469340d76168d746611dd37b07812a19467fc Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Mon, 18 Nov 2024 14:19:20 -0500 Subject: [PATCH 1/4] Update python, node, remove headless images --- .github/workflows/build.yml | 13 +++---------- headless.txt | 6 ------ 2 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 headless.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d5d2fc..b4d79f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,15 +26,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - suffix: ['', '-headless'] - python: ['3.12', '3.11', '3.10', '3.9'] - node: ['20', '18', '16'] + python: ['3.13', '3.12', '3.11', '3.10'] + node: ['22', '20', '18'] steps: - uses: actions/checkout@v4 - name: Configure tag & caching run: | # Set tag - TAG="py${{ matrix.python }}-node${{ matrix.node }}${{ matrix.suffix }}" + TAG="py${{ matrix.python }}-node${{ matrix.node }}" # Append a PR identifier if necessary PR="${{ github.event.pull_request.number }}" if [ ! -z "$PR" ]; then TAG="$TAG-pr$PR"; fi @@ -49,12 +48,6 @@ jobs: CACHEFROM="type=gha" fi echo "CACHEFROM=$CACHEFROM" >> $GITHUB_ENV - - - name: Prepare Dockerfile - if: matrix.suffix == '-headless' - run: | - mv Dockerfile original.txt - cat original.txt headless.txt > Dockerfile - name: Prepare image metadata id: meta uses: docker/metadata-action@v5 diff --git a/headless.txt b/headless.txt deleted file mode 100644 index 5549237..0000000 --- a/headless.txt +++ /dev/null @@ -1,6 +0,0 @@ -# The contents of this file are automatically appended to Dockerfile - -RUN apt-get update \ - && apt-get install -y chromium --no-install-recommends \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* From c348938504fc3cd8e6779b6c1f442d451f472571 Mon Sep 17 00:00:00 2001 From: Ed Rivas Date: Mon, 18 Nov 2024 13:47:53 -0600 Subject: [PATCH 2/4] Remove move versions --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4d79f3..da4d55d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.13', '3.12', '3.11', '3.10'] - node: ['22', '20', '18'] + python: ['3.13', '3.12', '3.11'] + node: ['22', '20'] steps: - uses: actions/checkout@v4 - name: Configure tag & caching From 52d28ca7135667122cfe5ffe81b09f2cb7ea94ed Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Mon, 18 Nov 2024 14:57:47 -0500 Subject: [PATCH 3/4] enable corepack --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 290ed07..29a0565 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm RUN ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx RUN ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn RUN ln -s /opt/yarn/bin/yarnpkg /usr/local/bin/yarnpkg +RUN corepack enable RUN node --version && npm --version && yarn --version # System setup: From 77677065c8ced1cd236b6a38e4259c9bba27f28e Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Mon, 18 Nov 2024 15:03:05 -0500 Subject: [PATCH 4/4] No need for local Yarn if using corepack --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29a0565..e15f775 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,9 @@ FROM python:${PYTHON_VERSION} # Node and npm COPY --from=node_base /usr/local/lib/node_modules /usr/local/lib/node_modules COPY --from=node_base /usr/local/bin/node /usr/local/bin/node -COPY --from=node_base /opt/yarn-* /opt/yarn RUN ln -s /usr/local/lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm RUN ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx -RUN ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn -RUN ln -s /opt/yarn/bin/yarnpkg /usr/local/bin/yarnpkg RUN corepack enable RUN node --version && npm --version && yarn --version