Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 34 additions & 85 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,102 +10,51 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: [3.1, 3.2, 3.3, 3.4]
node-version: [18, 20, 22]
variant: [default, slim, alpine]

steps:
- uses: actions/[email protected]

- name: Build the Docker image
- name: Build and test Docker image
run: |
echo "3.1 with Node.js 18"
docker run -i $(docker build -q 3.1/18) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.1 slim with Node.js 18"
docker run -i $(docker build -q 3.1/18/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.1 alpine with Node.js 18"
docker run -i $(docker build -q 3.1/18/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.2 with Node.js 18"
docker run -i $(docker build -q 3.2/18) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.2 slim with Node.js 18"
docker run -i $(docker build -q 3.2/18/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.2 alpine with Node.js 18"
docker run -i $(docker build -q 3.2/18/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.3 with Node.js 18"
docker run -i $(docker build -q 3.3/18) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.3 slim with Node.js 18"
docker run -i $(docker build -q 3.3/18/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.3 alpine with Node.js 18"
docker run -i $(docker build -q 3.3/18/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.4 with Node.js 18"
docker run -i $(docker build -q 3.4/18) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.4 slim with Node.js 18"
docker run -i $(docker build -q 3.4/18/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.4 alpine with Node.js 18"
docker run -i $(docker build -q 3.4/18/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.1 with Node.js 20"
docker run -i $(docker build -q 3.1/20) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.1 slim with Node.js 20"
docker run -i $(docker build -q 3.1/20/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.1 alpine with Node.js 20"
docker run -i $(docker build -q 3.1/20/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.2 with Node.js 20"
docker run -i $(docker build -q 3.2/20) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.2 slim with Node.js 20"
docker run -i $(docker build -q 3.2/20/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.2 alpine with Node.js 20"
docker run -i $(docker build -q 3.2/20/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.3 with Node.js 20"
docker run -i $(docker build -q 3.3/20) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.3 slim with Node.js 20"
docker run -i $(docker build -q 3.3/20/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.3 alpine with Node.js 20"
docker run -i $(docker build -q 3.3/20/alpine) /bin/sh -c "ruby --version && node --version && npm --version"
if [ "${{ matrix.variant }}" = "default" ]; then
VARIANT_PATH=""
VARIANT_LABEL=""
else
VARIANT_PATH="/${{ matrix.variant }}"
VARIANT_LABEL=" ${{ matrix.variant }}"
fi

IMAGE_PATH="${{ matrix.ruby-version }}/${{ matrix.node-version }}${VARIANT_PATH}"
echo "${{ matrix.ruby-version }} with Node.js ${{ matrix.node-version }}${VARIANT_LABEL}"

# Run container and capture version outputs
VERSIONS=$(docker run -i $(docker build -q ${IMAGE_PATH}) /bin/sh -c "ruby --version && node --version && npm --version")
echo "$VERSIONS"

# Check Ruby version
if ! echo "$VERSIONS" | grep -q "ruby ${{ matrix.ruby-version }}"; then
echo "::error::Expected Ruby ${{ matrix.ruby-version }} but got different version"
exit 1
fi

# Check Node version
if ! echo "$VERSIONS" | grep -q "v${{ matrix.node-version }}"; then
echo "::error::Expected Node.js ${{ matrix.node-version }} but got different version"
exit 1
fi

echo "3.4 with Node.js 20"
docker run -i $(docker build -q 3.4/20) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.4 slim with Node.js 20"
docker run -i $(docker build -q 3.4/20/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.4 alpine with Node.js 20"
docker run -i $(docker build -q 3.4/20/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.1 with Node.js 22"
docker run -i $(docker build -q 3.1/22) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.1 slim with Node.js 22"
docker run -i $(docker build -q 3.1/22/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.1 alpine with Node.js 22"
docker run -i $(docker build -q 3.1/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.2 with Node.js 22"
docker run -i $(docker build -q 3.2/22) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.2 slim with Node.js 22"
docker run -i $(docker build -q 3.2/22/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.2 alpine with Node.js 22"
docker run -i $(docker build -q 3.2/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.3 with Node.js 22"
docker run -i $(docker build -q 3.3/22) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.3 slim with Node.js 22"
docker run -i $(docker build -q 3.3/22/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.3 alpine with Node.js 22"
docker run -i $(docker build -q 3.3/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version"

echo "3.4 with Node.js 22"
docker run -i $(docker build -q 3.4/22) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.4 slim with Node.js 22"
docker run -i $(docker build -q 3.4/22/slim) /bin/sh -c "ruby --version && node --version && npm --version"
echo "3.4 alpine with Node.js 22"
docker run -i $(docker build -q 3.4/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version"
auto-merge:
runs-on: ubuntu-latest
needs: build

permissions:
pull-requests: write
contents: write

steps:
- name: Automatically merge dependabot upgrades
uses: fastify/[email protected]
Expand Down
9 changes: 6 additions & 3 deletions 3.1/20/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM ruby:3.1-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.1/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.1/20/alpine, 3.1-alpine-20 3.1-alpine-iron 3.1-alpine, linux/amd64,linux/arm64,linux/pp...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.1/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.1/20/alpine, 3.1-alpine-20 3.1-alpine-iron 3.1-alpine, linux/amd64,linux/arm64,linux/pp...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN apk -U upgrade \
RUN echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/community >> /etc/apk/repositories \
&& echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/main >> /etc/apk/repositories \
&& apk -U upgrade \
&& apk add --no-cache \
nodejs \
npm \
ada-libs@old-stable \
nodejs@old-stable \
npm@old-stable \
yarn
8 changes: 3 additions & 5 deletions 3.1/22/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
FROM ruby:3.1-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.1/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.1/22/alpine, 3.1-alpine-22 3.1-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.1/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.1/22/alpine, 3.1-alpine-22 3.1-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
&& echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
&& apk -U upgrade \
RUN apk -U upgrade \
&& apk add --no-cache \
nodejs-current@edge \
npm@edge \
nodejs \
npm \
yarn
9 changes: 6 additions & 3 deletions 3.2/20/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM ruby:3.2-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.2/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.2/20/alpine, 3.2-alpine-20 3.2-alpine-iron 3.2-alpine, linux/amd64,linux/arm64,linux/pp...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.2/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.2/20/alpine, 3.2-alpine-20 3.2-alpine-iron 3.2-alpine, linux/amd64,linux/arm64,linux/pp...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN apk -U upgrade \
RUN echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/community >> /etc/apk/repositories \
&& echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/main >> /etc/apk/repositories \
&& apk -U upgrade \
&& apk add --no-cache \
nodejs \
npm \
ada-libs@old-stable \
nodejs@old-stable \
npm@old-stable \
yarn
8 changes: 3 additions & 5 deletions 3.2/22/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
FROM ruby:3.2-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.2/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.2/22/alpine, 3.2-alpine-22 3.2-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.2/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.2/22/alpine, 3.2-alpine-22 3.2-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
&& echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
&& apk -U upgrade \
RUN apk -U upgrade \
&& apk add --no-cache \
nodejs-current@edge \
npm@edge \
nodejs \
npm \
yarn
9 changes: 6 additions & 3 deletions 3.3/20/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM ruby:3.3-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.3/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.3/20/alpine, 3.3-alpine-20 3.3-alpine-iron 3.3-alpine 3-alpine alpine, linux/amd64,linu...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.3/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.3/20/alpine, 3.3-alpine-20 3.3-alpine-iron 3.3-alpine 3-alpine alpine, linux/amd64,linu...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN apk -U upgrade \
RUN echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/community >> /etc/apk/repositories \
&& echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/main >> /etc/apk/repositories \
&& apk -U upgrade \
&& apk add --no-cache \
nodejs \
npm \
ada-libs@old-stable \
nodejs@old-stable \
npm@old-stable \
yarn
8 changes: 3 additions & 5 deletions 3.3/22/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
FROM ruby:3.3-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.3/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.3/22/alpine, 3.3-alpine-22 3.3-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.3/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.3/22/alpine, 3.3-alpine-22 3.3-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
&& echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
&& apk -U upgrade \
RUN apk -U upgrade \
&& apk add --no-cache \
nodejs-current@edge \
npm@edge \
nodejs \
npm \
yarn
9 changes: 6 additions & 3 deletions 3.4/20/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM ruby:3.4-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.4/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.4/20/alpine, 3.4-alpine-20 3.4-alpine-iron 3.4-alpine, linux/amd64,linux/arm64,linux/pp...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.4/20/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.4/20/alpine, 3.4-alpine-20 3.4-alpine-iron 3.4-alpine, linux/amd64,linux/arm64,linux/pp...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN apk -U upgrade \
RUN echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/community >> /etc/apk/repositories \
&& echo @old-stable https://dl-cdn.alpinelinux.org/alpine/v3.20/main >> /etc/apk/repositories \
&& apk -U upgrade \
&& apk add --no-cache \
nodejs \
npm \
ada-libs@old-stable \
nodejs@old-stable \
npm@old-stable \
yarn
9 changes: 3 additions & 6 deletions 3.4/22/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM ruby:3.4-alpine
LABEL maintainer "Tim Brust <[email protected]>"

Check warning on line 2 in 3.4/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.4/22/alpine, 3.4-alpine-22 3.4-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "LABEL key=value" should be used instead of legacy "LABEL key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

Check warning on line 5 in 3.4/22/alpine/Dockerfile

View workflow job for this annotation

GitHub Actions / buildx (3.4/22/alpine, 3.4-alpine-22 3.4-alpine-jod, linux/amd64,linux/arm64,linux/ppc64le,linux/...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
&& echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
&& apk -U upgrade \
RUN apk -U upgrade \
&& apk add --no-cache \
nodejs-current@edge \
npm@edge \
nodejs \
npm \
yarn

Loading