-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
681a9dc
commit 378f81c
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: node | ||
|
||
on: | ||
schedule: | ||
- cron: "15 3 * * 6" # At 03:15 on Saturday. | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: akorn | ||
password: ${{ secrets.docker_password }} | ||
- run: sh ./node/update.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ARG NODE_VERSION | ||
|
||
FROM node:${NODE_VERSION}-bookworm-slim as b | ||
|
||
RUN set -ex \ | ||
\ | ||
&& apt-get -yq update \ | ||
&& apt-get -yq upgrade \ | ||
\ | ||
&& apt-get -yq install binutils \ | ||
\ | ||
&& strip -sXx /usr/local/bin/node \ | ||
\ | ||
&& mkdir -p /opt/rootfs \ | ||
&& cd /opt/rootfs \ | ||
&& mkdir -p lib/x86_64-linux-gnu usr/local/bin \ | ||
\ | ||
&& cp -a /usr/local/bin/node usr/local/bin \ | ||
&& cp -a /lib/x86_64-linux-gnu/libstdc++.so* lib/x86_64-linux-gnu \ | ||
&& cp -a /lib/x86_64-linux-gnu/libgcc_s.so* lib/x86_64-linux-gnu | ||
|
||
FROM gcr.io/distroless/base-debian12 | ||
|
||
ARG NODE_VERSION | ||
LABEL nodejs/version=${NODE_VERSION} | ||
|
||
COPY --from=b /opt/rootfs / | ||
|
||
CMD [] | ||
ENTRYPOINT [ "/usr/local/bin/node" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
|
||
cd "$(dirname "$(readlink -f "$0")")" | ||
for major in 20 21 ; do | ||
version=$(docker run --rm node:${major}-bookworm-slim --version) | ||
version=${version:1} | ||
minor=$(echo ${version} | cut -d. -f2) | ||
|
||
image=akorn/node | ||
echo building ${version} ... | ||
|
||
docker2 buildx build \ | ||
--build-arg NODE_VERSION=${version} \ | ||
--tag ${image} \ | ||
--tag ${image}:${major} \ | ||
--tag ${image}:${major}.${minor} \ | ||
--tag ${image}:${version} \ | ||
--platform linux/amd64 \ | ||
. | ||
|
||
done |