Skip to content

Commit 5f5354b

Browse files
authored
fix(tqm): use artifacts from github releases (#701)
Signed-off-by: Devin Buhl <[email protected]>
1 parent f1346b5 commit 5f5354b

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

apps/tqm/Dockerfile

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM docker.io/library/golang:1.24-alpine AS builder
3+
FROM docker.io/library/alpine:3.22
4+
ARG TARGETARCH
45
ARG VERSION
56

67
USER root
7-
WORKDIR /app
88

9-
RUN apk add --no-cache git \
10-
&& git clone --single-branch --branch "${VERSION}" https://github.com/autobrr/tqm.git . \
11-
&& go mod download \
9+
RUN \
10+
apk add --no-cache \
11+
ca-certificates \
12+
catatonit \
13+
curl \
14+
bash \
15+
jq \
16+
nano \
17+
tzdata \
1218
&& \
13-
CGO_ENABLED=0 go build \
14-
-trimpath \
15-
-ldflags "-s -w -X github.com/autobrr/tqm/runtime.Version=${VERSION}" \
16-
-o tqm ./cmd/tqm
19+
mkdir -p /app/bin \
20+
&& curl -fsSL "https://github.com/autobrr/tqm/releases/download/${VERSION}/tqm_${VERSION#*v}_linux_${TARGETARCH}.tar.gz" \
21+
| tar xzf - -C /app/bin \
22+
&& chown -R root:root /app && chmod -R 755 /app \
23+
&& rm -rf /tmp/*
1724

18-
FROM scratch
19-
COPY --from=builder /app/tqm /tqm
20-
ENTRYPOINT ["/tqm"]
25+
COPY . /
26+
27+
USER nobody:nogroup
28+
WORKDIR /config
29+
VOLUME ["/config"]
30+
31+
ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"]

apps/tqm/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
exec \
4+
/app/bin/tqm \
5+
"$@"

apps/tqm/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
schemaVersion: "2.0.0"
33
fileExistenceTests:
44
- name: tqm
5-
path: /tqm
5+
path: /app/bin/tqm
66
shouldExist: true

0 commit comments

Comments
 (0)