-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.pluginloader
More file actions
28 lines (24 loc) · 1.52 KB
/
Dockerfile.pluginloader
File metadata and controls
28 lines (24 loc) · 1.52 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
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y \
wget curl jq libboost-system-dev libboost-filesystem-dev \
libboost-program-options-dev libboost-thread-dev libboost-chrono-dev \
libboost-date-time-dev libboost-atomic-dev libboost-json-dev \
openssl ca-certificates libcap2-bin
WORKDIR /app
RUN LATEST_VERSION=$(curl -s "https://gitlab.bubki.zip/api/v4/projects/d3156%2FPluginCore/releases/permalink/latest" | jq -r '.tag_name') \
&& if [ -z "$LATEST_VERSION" ] || [ "$LATEST_VERSION" = "null" ]; then echo "Failed to get latest version" && exit 1; fi \
&& echo "Latest version: $LATEST_VERSION" \
&& ASSET_URL=$(curl -s "https://gitlab.bubki.zip/api/v4/projects/d3156%2FPluginCore/releases/permalink/latest" \
| jq -r --arg name "PluginLoader_${LATEST_VERSION}" \
'.assets.links[]? | select(.name == $name) | .direct_download_url // empty' | head -n1) \
&& wget -O PluginLoader "$ASSET_URL" \
&& ASSET_DEB=$(curl -s "https://gitlab.bubki.zip/api/v4/projects/d3156%2FPluginCore/releases/permalink/latest" \
| jq -r --arg name "d3156-plugincore_${LATEST_VERSION}_amd64.deb" \
'.assets.links[]? | select(.name == $name) | .direct_download_url // empty' | head -n1) \
&& wget -O "d3156-plugincore_${LATEST_VERSION}_amd64.deb" "$ASSET_DEB" \
&& dpkg -i "d3156-plugincore_${LATEST_VERSION}_amd64.deb" \
&& chmod +x PluginLoader \
&& setcap cap_net_raw+ep PluginLoader \
&& rm -rf /var/lib/apt/lists/* \
&& rm "d3156-plugincore_${LATEST_VERSION}_amd64.deb"
EXPOSE 8000