Skip to content

Commit

Permalink
feat!: adds Node.js 16 flavor as new default (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
timbru31 authored Nov 15, 2021
1 parent 9be21ec commit fec0ad0
Show file tree
Hide file tree
Showing 15 changed files with 203 additions and 17 deletions.
48 changes: 39 additions & 9 deletions .github/workflows/buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,23 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 2.6/14
tags: "2.6 2.6-14 2.6-fermium"
tags: "2.6-14 2.6-fermium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.6/14/slim
tags: "2.6-slim 2.6-slim-14 2.6-slim-fermium"
tags: "2.6-slim-14 2.6-slim-fermium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.6/14/alpine
tags: "2.6-alpine 2.6-alpine-14 2.6-alpine-fermium"
tags: "2.6-alpine-14 2.6-alpine-fermium"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 2.6/16
tags: "2.6 2.6-16 2.6-gallium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.6/16/slim
tags: "2.6-slim 2.6-slim-16 2.6-slim-gallium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.6/16/alpine
tags: "2.6-alpine 2.6-alpine-16 2.6-alpine-gallium"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 2.7/12
Expand All @@ -44,13 +54,23 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 2.7/14
tags: "2.7 2.7-14 2.7-fermium"
tags: "2.7-14 2.7-fermium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.7/14/slim
tags: "2.7-slim 2.7-slim-14 2.7-slim-fermium"
tags: "2.7-slim-14 2.7-slim-fermium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.7/14/alpine
tags: "2.7-alpine 2.7-alpine-14 2.7-alpine-fermium"
tags: "2.7-alpine-14 2.7-alpine-fermium"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 2.7/16
tags: "2.7 2.7-16 2.7-gallium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.7/16/slim
tags: "2.7-slim 2.7-slim-16 2.7-slim-gallium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 2.7/16/alpine
tags: "2.7-alpine 2.7-alpine-16 2.7-alpine-gallium"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 3.0/12
Expand All @@ -64,13 +84,23 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 3.0/14
tags: "3.0 3.0-14 3.0-fermium latest"
tags: "3.0-14 3.0-fermium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 3.0/14/slim
tags: "3.0-slim 3.0-slim-14 3.0-slim-fermium slim"
tags: "3.0-slim-14 3.0-slim-fermium"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 3.0/14/alpine
tags: "3.0-alpine 3.0-alpine-14 3.0-alpine-fermium alpine"
tags: "3.0-alpine-14 3.0-alpine-fermium"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6

- path: 3.0/16
tags: "3.0 3.0-16 3.0-gallium latest"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 3.0/16/slim
tags: "3.0-slim 3.0-slim-16 3.0-slim-gallium slim"
platforms: linux/amd64,linux/arm64,linux/arm/v7
- path: 3.0/16/alpine
tags: "3.0-alpine 3.0-alpine-16 3.0-alpine-gallium alpine"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
steps:
- name: Checkout
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
docker run -i $(docker build -q 2.6/14/slim) /bin/sh -c "ruby --version && node --version"
echo "2.6 alpine with Node.js 14"
docker run -i $(docker build -q 2.6/14/alpine) /bin/sh -c "ruby --version && node --version"
echo "2.6 with Node.js 16"
docker run -i $(docker build -q 2.6/16) /bin/sh -c "ruby --version && node --version"
echo "2.6 slim with Node.js 16"
docker run -i $(docker build -q 2.6/16/slim) /bin/sh -c "ruby --version && node --version"
echo "2.6 alpine with Node.js 16"
docker run -i $(docker build -q 2.6/16/alpine) /bin/sh -c "ruby --version && node --version"
echo "2.7 with Node.js 12"
docker run -i $(docker build -q 2.7/12) /bin/sh -c "ruby --version && node --version"
Expand All @@ -34,6 +40,12 @@ jobs:
docker run -i $(docker build -q 2.7/14/slim) /bin/sh -c "ruby --version && node --version"
echo "2.7 alpine with Node.js 14"
docker run -i $(docker build -q 2.7/14/alpine) /bin/sh -c "ruby --version && node --version"
echo "2.7 with Node.js 16"
docker run -i $(docker build -q 2.7/16) /bin/sh -c "ruby --version && node --version"
echo "2.7 slim with Node.js 16"
docker run -i $(docker build -q 2.7/16/slim) /bin/sh -c "ruby --version && node --version"
echo "2.7 alpine with Node.js 16"
docker run -i $(docker build -q 2.7/16/alpine) /bin/sh -c "ruby --version && node --version"
echo "3.0 with Node.js 12"
docker run -i $(docker build -q 3.0/12) /bin/sh -c "ruby --version && node --version"
Expand All @@ -45,5 +57,11 @@ jobs:
docker run -i $(docker build -q 3.0/14) /bin/sh -c "ruby --version && node --version"
echo "3.0 slim with Node.js 14"
docker run -i $(docker build -q 3.0/14/slim) /bin/sh -c "ruby --version && node --version"
echo "3.0 alpine"
echo "3.0 alpine with Node.js 14"
docker run -i $(docker build -q 3.0/14/alpine) /bin/sh -c "ruby --version && node --version"
echo "3.0 with Node.js 16"
docker run -i $(docker build -q 3.0/16) /bin/sh -c "ruby --version && node --version"
echo "3.0 slim with Node.js 16"
docker run -i $(docker build -q 3.0/16/slim) /bin/sh -c "ruby --version && node --version"
echo "3.0 alpine with Node.js 16"
docker run -i $(docker build -q 3.0/16/alpine) /bin/sh -c "ruby --version && node --version"
2 changes: 1 addition & 1 deletion 2.6/14/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

RUN apk -U upgrade \
&& apk add --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ --no-cache \
&& apk add --no-cache \
nodejs \
npm \
yarn
15 changes: 15 additions & 0 deletions 2.6/16/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ruby:2.6
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
&& apt-get update -qq && apt-get install -qq --no-install-recommends \
nodejs \
&& apt-get upgrade -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*\
&& npm install -g yarn@1
11 changes: 11 additions & 0 deletions 2.6/16/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ruby:2.6-alpine
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

RUN apk -U upgrade \
&& apk add --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ --no-cache \
nodejs \
npm \
yarn
20 changes: 20 additions & 0 deletions 2.6/16/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ruby:2.6-slim
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

# hadolint ignore=DL3009
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
curl \
gnupg2

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get update -qq && apt-get install -qq --no-install-recommends \
nodejs \
&& apt-get upgrade -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*\
&& npm install -g yarn@1
2 changes: 1 addition & 1 deletion 2.7/14/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

RUN apk -U upgrade \
&& apk add --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ --no-cache \
&& apk add --no-cache \
nodejs \
npm \
yarn
15 changes: 15 additions & 0 deletions 2.7/16/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ruby:2.7
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
&& apt-get update -qq && apt-get install -qq --no-install-recommends \
nodejs \
&& apt-get upgrade -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*\
&& npm install -g yarn@1
11 changes: 11 additions & 0 deletions 2.7/16/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ruby:2.7-alpine
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

RUN apk -U upgrade \
&& apk add --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ --no-cache \
nodejs \
npm \
yarn
20 changes: 20 additions & 0 deletions 2.7/16/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ruby:2.7-slim
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

# hadolint ignore=DL3009
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
curl \
gnupg2

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
&& apt-get update -qq && apt-get install -qq --no-install-recommends \
nodejs \
&& apt-get upgrade -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*\
&& npm install -g yarn@1
2 changes: 1 addition & 1 deletion 3.0/14/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

RUN apk -U upgrade \
&& apk add --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ --no-cache \
&& apk add --no-cache \
nodejs \
npm \
yarn
15 changes: 15 additions & 0 deletions 3.0/16/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ruby:3.0
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
&& apt-get update -qq && apt-get install -qq --no-install-recommends \
nodejs \
&& apt-get upgrade -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*\
&& npm install -g yarn@1
11 changes: 11 additions & 0 deletions 3.0/16/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ruby:3.0-alpine
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

RUN apk -U upgrade \
&& apk add --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ --no-cache \
nodejs \
npm \
yarn
20 changes: 20 additions & 0 deletions 3.0/16/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ruby:3.0-slim
LABEL maintainer "Tim Brust <github@timbrust.de>"

ARG REFRESHED_AT
ENV REFRESHED_AT $REFRESHED_AT

# hadolint ignore=DL3009
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
curl \
gnupg2

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -\
&& apt-get update -qq && apt-get install -qq --no-install-recommends \
nodejs \
&& apt-get upgrade -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*\
&& npm install -g yarn@1
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Ruby 2.6, 2.7 or 3.0 with Node.js 12 or 14 LTS Dockerfile
# Ruby 2.6, 2.7 or 3.0 with Node.js 12, 14 or 16 LTS Dockerfile

[![Docker Automated build](https://img.shields.io/docker/automated/timbru31/ruby-node.svg)](https://hub.docker.com/r/timbru31/ruby-node/)
[![buildx Status](https://github.com/timbru31/docker-ruby-node/workflows/buildx/badge.svg)](https://github.com/timbru31/docker-ruby-node/actions?query=workflow%3Abuildx)
[![Lint Dockerfiles](https://github.com/timbru31/docker-ruby-node/workflows/Lint%20Dockerfiles/badge.svg)](https://github.com/timbru31/docker-ruby-node/actions?query=workflow%3A%22Lint+Dockerfiles%22)

A minimal Dockerfile based on Ruby (2.6, 2.7 or 3.0) Dockerfile (regular, slim or alpine) with Node.js 12 LTS (Erbium) or Node.js 14 LTS (Fermium) installed. Please note, that the Node.js 12 LTS (Erbium) builds for alpine might be outdated due to Alpine's update policy.
A minimal Dockerfile based on Ruby (2.6, 2.7 or 3.0) Dockerfile (regular, slim or alpine) with Node.js 12 LTS (Erbium), Node.js 14 LTS (Fermium) or Node.js 16 LTS (Gallium) installed. Please note, that the Node.js 12 LTS (Erbium) builds for alpine might be outdated due to Alpine's update policy.

## What's included

- Ruby 2.6, 2.7 or 3.0
- Node.js 12 (Erbium) LTS or 14 LTS (Fermium)
- npm 6 (latest for Node.js LTS v14 on alpine, see [why](https://gitlab.alpinelinux.org/alpine/aports/-/commit/25b10bd1a93e12a7e49fee38b0a229281ae49fb7))
- Node.js 12 (Erbium) LTS, 14 LTS (Fermium) or 16 LTS (Gallium)
- bundled npm that comes with the respective Node.js version (latest for Node.js LTS v14+ on alpine, see [why](https://gitlab.alpinelinux.org/alpine/aports/-/commit/25b10bd1a93e12a7e49fee38b0a229281ae49fb7))
- yarn

### Available platforms
Expand Down

0 comments on commit fec0ad0

Please sign in to comment.