Skip to content

Commit 81586ed

Browse files
committed
[Feat] Add nginx into node:22 image
1 parent fd8d58c commit 81586ed

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

22-nginx/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Use the base image
2+
FROM kooldev/node:22
3+
4+
RUN apk add --no-cache nginx
5+

22-nginx/entrypoint

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Run as current user
5+
CURRENT_USER=${ASUSER:-${UID:-0}}
6+
7+
if [ ! -z "$CURRENT_USER" ] && [ "$CURRENT_USER" != "0" ]; then
8+
usermod -u $CURRENT_USER kool
9+
fi
10+
11+
# Run entrypoint if provided
12+
if [ ! -z "$ENTRYPOINT" ] && [ -f "$ENTRYPOINT" ]; then
13+
bash $ENTRYPOINT
14+
fi
15+
16+
if [ ! -z "$CURRENT_USER" ] && [ "$CURRENT_USER" != "0" ]; then
17+
exec su-exec kool "$@"
18+
else
19+
exec "$@"
20+
fi

22-nginx/kool-npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
scripts-prepend-node-path=true
2+
package-import-method=copy
3+
shamefully-hoist=true
4+
store-dir=/home/kool/.pnpm-store

22-nginx/root-npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
scripts-prepend-node-path=true
2+
package-import-method=copy
3+
shamefully-hoist=true
4+
store-dir=/root/.pnpm-store

0 commit comments

Comments
 (0)