-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
89 lines (75 loc) · 2.15 KB
/
Dockerfile
File metadata and controls
89 lines (75 loc) · 2.15 KB
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
85
86
87
88
89
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 \
musl-locales \
mysql-client
SHELL ["/bin/bash", "-c"]
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
RUN printf 'export LANG=C.UTF-8\nexport LC_ALL=C.UTF-8\n' > /etc/profile.d/locale.sh
# Download and unzip the latest Blueprint release
RUN wget "$(curl -s https://api.github.com/repos/BlueprintFramework/framework/releases/latest | grep 'browser_download_url' | grep 'release.zip' | cut -d '"' -f 4)" -O blueprint.zip \
&& unzip -o blueprint.zip -d /app \
&& touch /.dockerenv \
&& rm blueprint.zip
# Install dependencies and update browser compatibility data
RUN retry() { for i in 1 2 3; do "$@" && return || sleep 10; done; exit 1; } && \
retry npm install -g yarn && \
retry yarn --network-timeout 120000 && \
retry npx update-browserslist-db@latest && \
retry yarn add baseline-browser-mapping@latest --dev
# 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