Skip to content

Commit a5a6d00

Browse files
authored
feat: add node pterodactyl images (#17)
1 parent 1a2f573 commit a5a6d00

File tree

5 files changed

+142
-0
lines changed

5 files changed

+142
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# TAGS: gallium, lts
2+
# VARIANT: alpine
3+
# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/ppc64le, linux/s390x
4+
FROM docker.io/library/node:16.17.1-alpine
5+
6+
LABEL author="Frutbits Indonesia" maintainer="[email protected]"
7+
8+
ARG BUILDPLATFORM
9+
10+
WORKDIR /app
11+
12+
RUN apk add --no-cache \
13+
tini \
14+
tzdata \
15+
ca-certificates curl ffmpeg git openssl sqlite tar tzdata \
16+
&& adduser -D -h /home/container container
17+
18+
USER container
19+
ENV USER=container HOME=/home/container
20+
WORKDIR /home/container
21+
22+
COPY ../../entrypoint.sh /entrypoint.sh
23+
CMD ["/bin/ash", "/entrypoint.sh"]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# TAGS: gallium, lts
2+
# VARIANT:
3+
# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x
4+
FROM docker.io/library/node:16.17.1-bullseye-slim
5+
6+
LABEL author="Frutbits Indonesia" maintainer="[email protected]"
7+
8+
ARG BUILDPLATFORM
9+
10+
WORKDIR /app
11+
12+
RUN apt-get update \
13+
&& apt-get install -y --no-install-recommends \
14+
iputils-ping \
15+
procps \
16+
tini \
17+
tzdata \
18+
curl \
19+
ffmpeg \
20+
git \
21+
openssl \
22+
sqlite \
23+
tar \
24+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
25+
&& apt-get autoremove -y \
26+
&& apt-get autoclean -y \
27+
&& rm -rf /var/lib/apt/lists/* \
28+
&& adduser -D -h /home/container container
29+
30+
USER container
31+
ENV USER=container HOME=/home/container
32+
WORKDIR /home/container
33+
34+
COPY ../../entrypoint.sh /entrypoint.sh
35+
CMD ["/bin/bash", "/entrypoint.sh"]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# TAGS: current, latest
2+
# VARIANT: alpine
3+
# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/ppc64le, linux/s390x
4+
FROM docker.io/library/node:18.10.0-alpine
5+
6+
LABEL author="Frutbits Indonesia" maintainer="[email protected]"
7+
8+
ARG BUILDPLATFORM
9+
10+
WORKDIR /app
11+
12+
RUN apk add --no-cache \
13+
tini \
14+
tzdata \
15+
ca-certificates curl ffmpeg git openssl sqlite tar tzdata \
16+
&& adduser -D -h /home/container container
17+
18+
USER container
19+
ENV USER=container HOME=/home/container
20+
WORKDIR /home/container
21+
22+
COPY ../../entrypoint.sh /entrypoint.sh
23+
CMD ["/bin/ash", "/entrypoint.sh"]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# TAGS: current, latest
2+
# VARIANT:
3+
# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x
4+
FROM docker.io/library/node:18.10.0-slim
5+
6+
LABEL author="Frutbits Indonesia" maintainer="[email protected]"
7+
8+
ARG BUILDPLATFORM
9+
10+
WORKDIR /app
11+
12+
RUN apt-get update \
13+
&& apt-get install -y --no-install-recommends \
14+
iputils-ping \
15+
procps \
16+
tini \
17+
tzdata \
18+
curl \
19+
ffmpeg \
20+
git \
21+
openssl \
22+
sqlite \
23+
tar \
24+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
25+
&& apt-get autoremove -y \
26+
&& apt-get autoclean -y \
27+
&& rm -rf /var/lib/apt/lists/* \
28+
&& adduser -D -h /home/container container
29+
30+
USER container
31+
ENV USER=container HOME=/home/container
32+
WORKDIR /home/container
33+
34+
COPY ../../entrypoint.sh /entrypoint.sh
35+
CMD ["/bin/bash", "/entrypoint.sh"]

node/pterodactyl/entrypoint.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/ash
2+
# Default the TZ environment variable to UTC.
3+
TZ=${TZ:-UTC}
4+
export TZ
5+
6+
# Set environment variable that holds the Internal Docker IP
7+
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
8+
export INTERNAL_IP
9+
10+
# Switch to the container's working directory
11+
cd /home/container || exit 1
12+
13+
# Print Node.js version
14+
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mnode -v\n"
15+
node -v
16+
17+
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
18+
# variable format of "${VARIABLE}" before evaluating the string and automatically
19+
# replacing the values.
20+
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
21+
22+
# Display the command we're running in the output, and then execute it with the env
23+
# from the container itself.
24+
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED"
25+
# shellcheck disable=SC2086
26+
exec env ${PARSED}

0 commit comments

Comments
 (0)