Skip to content

Commit 02168d4

Browse files
committed
release: node22
1 parent defd95e commit 02168d4

2 files changed

Lines changed: 109 additions & 0 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Push Docker Images
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
include:
14+
- dockerfile: Dockerfile.node22-bullseye
15+
tag: node22-bullseye
16+
17+
permissions:
18+
contents: read
19+
packages: write
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v2
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
31+
- name: Log in to GitHub Container Registry
32+
uses: docker/login-action@v2
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Build and push
39+
uses: docker/build-push-action@v4
40+
with:
41+
context: .
42+
file: ${{ matrix.dockerfile }}
43+
platforms: linux/amd64,linux/arm64
44+
push: true
45+
tags: ghcr.io/${{ github.repository }}:${{ matrix.tag }}

Dockerfile.node22-bullseye

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
FROM ruby:3.4-bullseye
2+
3+
ENV LC_ALL=en_US.UTF-8
4+
5+
RUN set -ex \
6+
&& apt-get update \
7+
&& apt-get upgrade -y \
8+
&& apt-get install -y --no-install-recommends \
9+
ca-certificates \
10+
apt-transport-https \
11+
supervisor \
12+
openssh-server \
13+
cron \
14+
locales \
15+
net-tools \
16+
dnsutils \
17+
rsync \
18+
screen \
19+
curl \
20+
wget \
21+
gnupg \
22+
vim \
23+
git-core \
24+
logrotate \
25+
&& apt-get clean \
26+
&& rm -rf /var/lib/apt/lists/*
27+
28+
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
29+
&& locale-gen \
30+
&& update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en:
31+
32+
RUN mkdir -p /var/log/supervisor \
33+
&& echo '[supervisord]\nnodaemon=true' >> /etc/supervisor/conf.d/supervisord.conf \
34+
&& echo '[program:cron]\ncommand=/usr/sbin/cron -f' >> /etc/supervisor/conf.d/cron.conf \
35+
&& mkdir -p /var/run/sshd \
36+
&& echo '[program:sshd]\ncommand=/usr/sbin/sshd -D' >> /etc/supervisor/conf.d/sshd.conf
37+
38+
RUN wget -O - https://openresty.org/package/pubkey.gpg | apt-key add - \
39+
&& codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release) \
40+
&& if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "amd64" ]; then \
41+
echo "deb http://openresty.org/package/debian $codename openresty" | tee /etc/apt/sources.list.d/openresty.list; \
42+
elif [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ]; then \
43+
echo "deb http://openresty.org/package/arm64/debian $codename openresty" | tee /etc/apt/sources.list.d/openresty.list; \
44+
else \
45+
echo "Unsupported architecture"; \
46+
exit 1; \
47+
fi \
48+
&& apt-get update \
49+
&& apt-get install -y --no-install-recommends openresty \
50+
&& apt-get clean \
51+
&& rm -rf /var/lib/apt/lists/* \
52+
&& echo '[program:openresty]\ncommand=/usr/bin/openresty -g "daemon off;"' >> /etc/supervisor/conf.d/openresty.conf
53+
54+
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - \
55+
&& apt-get update \
56+
&& apt-get install -y --no-install-recommends nodejs \
57+
&& apt-get clean \
58+
&& rm -rf /var/lib/apt/lists/*
59+
60+
WORKDIR /opt
61+
62+
EXPOSE 22 80
63+
64+
CMD ["sh", "-c", "env >> /etc/environment ; /usr/bin/supervisord"]

0 commit comments

Comments
 (0)