Skip to content

Commit cb4a6ea

Browse files
author
xyzjesper
committed
Add DisBot entrypoint.sh ready docker image
1 parent 03a3877 commit cb4a6ea

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

.github/workflows/customer-builder.yml renamed to .github/workflows/disbot-builder-entry.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) https://github.com/gOOvER/own-pterodactyl-images/blob/main/LICENSE
33
#
44

5-
name: DisBot Docker Builder (Customer)
5+
name: DisBot Docker Builder (EntryPoint)
66

77
on:
88
# Allows you to run this workflow manually from the Actions tab
@@ -18,7 +18,7 @@ env:
1818
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
1919
jobs:
2020
push:
21-
name: "Customer Builder"
21+
name: "DisBot Builder"
2222
runs-on: ubuntu-latest
2323
permissions:
2424
contents: read
@@ -52,9 +52,9 @@ jobs:
5252
- uses: docker/build-push-action@v5
5353
with:
5454
context: .
55-
file: docker/CustomerDockerfile
55+
file: docker/DisBotDockerfileWithEntry
5656
platforms: linux/amd64
5757
push: true
5858
tags: |
59-
ghcr.io/disbotdevelopment/disbot-bot:${{ steps.package-version.outputs.current-version}}
60-
ghcr.io/disbotdevelopment/disbot-bot:latest
59+
ghcr.io/disbotdevelopment/disbot-bot:${{ steps.package-version.outputs.current-version}}-with-entry
60+
ghcr.io/disbotdevelopment/disbot-bot:latest-with-entry
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,23 @@ RUN apt-get update && apt-get install -y \
1212
g++ \
1313
curl \
1414
ca-certificates \
15-
&& apt-get clean
15+
&& apt-get clean && useradd -m -d /home/container container
1616

17-
WORKDIR /home/container
17+
WORKDIR /bot
1818
COPY . .
1919

2020
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
2121
apt-get install -y nodejs
2222

2323
RUN bun install @napi-rs/canvas
24+
2425
RUN bun install --force
26+
2527
RUN bun run build
26-
RUN useradd -m -d /home/container container
27-
ENV USER=container HOME=/home/container
28-
USER container
29-
COPY ./entrypoint.sh /entrypoint.sh
30-
CMD ["/bin/bash", "/entrypoint.sh"]
28+
29+
USER container
30+
ENV USER=container HOME=/home/container
31+
WORKDIR /home/container
32+
33+
COPY entrypoint.sh /entrypoint.sh
34+
CMD [ "/bin/bash", "/entrypoint.sh" ]

docker/entrypoint.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ export TZ=UTC
99
# Get the internal IP address
1010
export INTERNAL_IP=$(ip route get 1 | awk '{print $NF; exit}')
1111

12-
# Display NodeJS version
13-
echo "NodeJS Version:"
14-
node -v
15-
1612
# Replace startup variables
1713
PARSED=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
1814

19-
2015
# Run the main process
2116
eval ${PARSED}
2217

0 commit comments

Comments
 (0)