-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
84 lines (72 loc) · 1.94 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
ARG VERSION_TAG
FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/pterodactyl/panel:${VERSION_TAG}
# Set the Working Directory
WORKDIR /app
# Install necessary packages
RUN apk update && apk add --no-cache \
unzip \
zip \
curl \
git \
bash \
wget \
nodejs \
npm \
coreutils \
build-base \
musl-dev \
libgcc \
openssl \
openssl-dev \
linux-headers \
ncurses \
rsync \
inotify-tools \
sed
# Install yarn and Pterodactyl dependencies, as well as update browserlist
RUN for i in {1..3}; do \
npm install -g yarn && \
yarn --network-timeout 120000 && \
npx update-browserslist-db@latest && \
break || \
echo "Attempt $i failed! Retrying..." && \
sleep 10; \
done
# Download and unzip the latest Blueprint release
RUN wget $(curl -s https://api.github.com/repos/BlueprintFramework/framework/releases/latest | grep 'browser_download_url' | cut -d '"' -f 4) -O blueprint.zip \
&& unzip -o blueprint.zip -d /app \
&& touch /.dockerenv \
&& rm blueprint.zip
# Required for tput (used in blueprint.sh)
ENV TERM=xterm
# Copy helpers directory - has to be done before running blueprint.sh for .blueprintrc to set correct permisisons
COPY .helpers /helpers
RUN mv /helpers/.blueprintrc /app/.blueprintrc
RUN chmod +x /helpers/*.sh
# Make the script executable and run it
RUN chmod +x blueprint.sh \
&& bash blueprint.sh
# Create directory for blueprint extensions
RUN mkdir -p /blueprint_extensions
# Append our additions to supervisord
RUN echo "" >> /etc/supervisord.conf && \
cat >> /etc/supervisord.conf <<'EOF'
[program:database-seeder]
command=/helpers/seeder.sh
user=nginx
autostart=true
autorestart=false
startsecs=0
[program:listener]
command=/helpers/listen.sh
user=root
autostart=true
autorestart=true
[program:fix-bind-mount-perms]
command=/helpers/permissions.sh
user=root
autostart=true
autorestart=false
startsecs=0
priority=1
EOF