-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (57 loc) · 2.09 KB
/
Dockerfile
File metadata and controls
64 lines (57 loc) · 2.09 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
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.23
# set version label
ARG BUILD_DATE
ARG VERSION
ARG GAMARR_RELEASE
LABEL build_version="Gamarr version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="gamarr-app"
LABEL org.opencontainers.image.source="https://github.com/gamarr-app/Gamarr"
LABEL org.opencontainers.image.url="https://github.com/gamarr-app/Gamarr"
LABEL org.opencontainers.image.description="A game collection manager for Usenet and BitTorrent users."
# environment settings
ARG GAMARR_BRANCH="main"
ENV XDG_CONFIG_HOME="/config/xdg" \
COMPlus_EnableDiagnostics=0 \
TMPDIR=/run/gamarr-temp
RUN \
echo "**** install packages ****" && \
apk add -U --upgrade --no-cache \
aspnetcore10-runtime \
clamav \
clamav-daemon \
clamav-libunrar \
icu-libs \
sqlite-libs \
xmlstarlet && \
echo "**** install gamarr ****" && \
mkdir -p /app/gamarr/bin && \
if [ -z ${GAMARR_RELEASE+x} ]; then \
GAMARR_RELEASE=$(curl -sL "https://api.github.com/repos/gamarr-app/Gamarr/releases/latest" \
| jq -r '.tag_name' | sed 's/^v//'); \
fi && \
ARCH=$(uname -m) && \
case "$ARCH" in \
x86_64) RUNTIME="linux-musl-x64" ;; \
aarch64) RUNTIME="linux-musl-arm64" ;; \
armv7l) RUNTIME="linux-musl-arm" ;; \
*) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
esac && \
echo "Downloading Gamarr ${GAMARR_RELEASE} for ${RUNTIME}" && \
curl -o \
/tmp/gamarr.tar.gz -L \
"https://github.com/gamarr-app/Gamarr/releases/download/v${GAMARR_RELEASE}/Gamarr.${GAMARR_RELEASE}.${RUNTIME}.tar.gz" && \
tar xzf \
/tmp/gamarr.tar.gz -C \
/app/gamarr/bin --strip-components=1 && \
echo -e "UpdateMethod=docker\nBranch=${GAMARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[gamarr-app](https://github.com/gamarr-app)" > /app/gamarr/package_info && \
printf "Gamarr version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
/app/gamarr/bin/Gamarr.Update \
/tmp/*
# copy local files
COPY docker/root/ /
# ports and volumes
EXPOSE 6767
VOLUME /config