-
Notifications
You must be signed in to change notification settings - Fork 0
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
344dfde
commit 7088e62
Showing
10 changed files
with
146 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,62 @@ | ||
name: Build Node Image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
node22Version: | ||
description: 'Node 22 Version' | ||
default: '22.2.0' | ||
required: true | ||
node21Version: | ||
description: 'Node 21 Version' | ||
default: '21.7.3' | ||
required: true | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build Node-22 and Push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./node/22 | ||
file: Dockerfile | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x | ||
push: true | ||
build-args: | ||
NODE_VERSION=${{ github.event.inputs.node22Version }} | ||
tags: | | ||
1panel/node:${{ github.event.inputs.node22Version }} | ||
#outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Build Node-21 and Push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./node/21 | ||
file: Dockerfile | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x | ||
push: true | ||
build-args: | ||
NODE_VERSION=${{ github.event.inputs.node21Version }} | ||
tags: | | ||
1panel/node:${{ github.event.inputs.node21Version }} | ||
#outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,10 @@ | ||
ARG NODE_VERSION | ||
|
||
FROM node:${NODE_VERSION} | ||
|
||
RUN npm install -g pnpm | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
CMD [ "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,11 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Run command with node if the first argument contains a "-" or is not a system command. The last | ||
# part inside the "{}" is a workaround for the following bug in ash/dash: | ||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 | ||
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then | ||
set -- node "$@" | ||
fi | ||
|
||
exec "$@" |
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,10 @@ | ||
ARG NODE_VERSION | ||
|
||
FROM node:${NODE_VERSION} | ||
|
||
RUN npm install -g pnpm | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
CMD [ "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,11 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Run command with node if the first argument contains a "-" or is not a system command. The last | ||
# part inside the "{}" is a workaround for the following bug in ash/dash: | ||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 | ||
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then | ||
set -- node "$@" | ||
fi | ||
|
||
exec "$@" |
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,10 @@ | ||
ARG NODE_VERSION | ||
|
||
FROM node:${NODE_VERSION} | ||
|
||
RUN npm install -g pnpm | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
CMD [ "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,11 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Run command with node if the first argument contains a "-" or is not a system command. The last | ||
# part inside the "{}" is a workaround for the following bug in ash/dash: | ||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 | ||
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then | ||
set -- node "$@" | ||
fi | ||
|
||
exec "$@" |
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,10 @@ | ||
ARG NODE_VERSION | ||
|
||
FROM node:${NODE_VERSION} | ||
|
||
RUN npm install -g pnpm | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
CMD [ "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,11 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Run command with node if the first argument contains a "-" or is not a system command. The last | ||
# part inside the "{}" is a workaround for the following bug in ash/dash: | ||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 | ||
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then | ||
set -- node "$@" | ||
fi | ||
|
||
exec "$@" |
Empty file.