mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-19 09:53:02 -04:00
standardize apt-get, rebase to 3.14
This commit is contained in:
+11
-11
@@ -1,24 +1,24 @@
|
|||||||
## Buildstage ##
|
## Buildstage ##
|
||||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.12 as buildstage
|
FROM ghcr.io/linuxserver/baseimage-alpine:3.14 as buildstage
|
||||||
|
|
||||||
ARG COMP_RT_RELEASE
|
ARG COMP_RT_RELEASE
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
jq && \
|
jq && \
|
||||||
if [ -z "${COMP_RT_RELEASE}" ]; then \
|
if [ -z "${COMP_RT_RELEASE}" ]; then \
|
||||||
COMP_RT_RELEASE=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/latest" | jq -r '.tag_name'); \
|
COMP_RT_RELEASE=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/latest" | jq -r '.tag_name'); \
|
||||||
fi && \
|
fi && \
|
||||||
COMP_RT_URLS=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/tags/${COMP_RT_RELEASE}" | jq -r '.body' | grep wget | grep -v ww47 | sed 's|wget ||g') && \
|
COMP_RT_URLS=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/tags/${COMP_RT_RELEASE}" | jq -r '.body' | grep wget | grep -v ww47 | sed 's|wget ||g') && \
|
||||||
echo "**** grab debs ****" && \
|
echo "**** grab debs ****" && \
|
||||||
mkdir -p /root-layer/opencl-intel && \
|
mkdir -p /root-layer/opencl-intel && \
|
||||||
for i in $COMP_RT_URLS; do \
|
for i in $COMP_RT_URLS; do \
|
||||||
echo "**** downloading ${i%$'\r'} ****" && \
|
echo "**** downloading ${i%$'\r'} ****" && \
|
||||||
curl -o /root-layer/opencl-intel/$(basename "${i%$'\r'}") \
|
curl -o /root-layer/opencl-intel/$(basename "${i%$'\r'}") \
|
||||||
-L "${i%$'\r'}"; \
|
-L "${i%$'\r'}"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# copy local files
|
# copy local files
|
||||||
COPY root/ /root-layer/
|
COPY root/ /root-layer/
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
apt-get update
|
||||||
@@ -2,24 +2,23 @@
|
|||||||
|
|
||||||
# Determine if setup is needed
|
# Determine if setup is needed
|
||||||
if [ ! -f "/usr/bin/apt" ]; then
|
if [ ! -f "/usr/bin/apt" ]; then
|
||||||
echo "**** Image is not Ubuntu, skipping opencl-intel install ****"
|
echo "**** Image is not Ubuntu, skipping opencl-intel install ****"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(uname -m) != "x86_64" ]; then
|
if [ $(uname -m) != "x86_64" ]; then
|
||||||
echo "**** Opencl-intel only works on X86_64, skipping ****"
|
echo "**** Opencl-intel only works on X86_64, skipping ****"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "**** Installing clinfo ****"
|
echo "**** Installing clinfo ****"
|
||||||
apt-get update
|
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
clinfo
|
clinfo
|
||||||
|
|
||||||
if [ -d /opencl-intel ]; then
|
if [ -d /opencl-intel ]; then
|
||||||
echo "**** Installing/updating opencl-intel debs ****"
|
echo "**** Installing/updating opencl-intel debs ****"
|
||||||
dpkg -i /opencl-intel/*.deb
|
dpkg -i /opencl-intel/*.deb
|
||||||
rm -rf /opencl-intel
|
rm -rf /opencl-intel
|
||||||
else
|
else
|
||||||
echo "**** Opencl-intel already installed ****"
|
echo "**** Opencl-intel already installed ****"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user