Skip to content

Commit 5acdb31

Browse files
committed
Fixed by build ourself
1 parent a26b662 commit 5acdb31

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

tools/ravel/Dockerfile.template

+24-14
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
11
#syntax=docker/dockerfile:1.12.1@sha256:93bfd3b68c109427185cd78b4779fc82b484b0b7618e36d0f104d4d801e66d25
22

3+
FROM ghcr.io/uniget-org/tools/go:latest AS go
4+
FROM ghcr.io/uniget-org/tools/goreleaser:latest AS goreleaser
5+
36
FROM registry.gitlab.com/uniget-org/images/ubuntu:24.04 AS prepare
47
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
58
/etc/profile.d/ \
69
/etc/profile.d/
710
SHELL [ "bash", "-clo", "errexit" ]
811
ARG name
912
ARG version
10-
RUN --mount=type=cache,target=/var/cache/uniget/download <<EOF
11-
url="https://github.com/valyentdev/ravel/releases/download/v${version}/ravel_${version}_linux_${alt_arch}.tar.gz"
12-
filename="$( basename "${url}" )"
13-
check-github-release-asset "valyentdev/ravel" "v${version}" "${filename}"
14-
curl --silent --show-error --location --fail --output "${uniget_cache_download}/${filename}" \
15-
"${url}"
16-
17-
tar --file="${uniget_cache_download}/${filename}" --list
18-
tar --file="${uniget_cache_download}/${filename}" --extract --gzip --directory="${prefix}/bin" --no-same-owner \
19-
ravel
20-
21-
curl --silent --show-error --location --fail --output "${prefix}/etc/systemd/system/ravel.service.go-template" \
22-
"https://github.com/valyentdev/ravel/blob/v${version}/docs/init/ravel.service"
23-
sed -E -i "s|ExecStart=/usr/local/bin/ravel|ExecStart={{ .Target }}/bin/ravel|" "${prefix}/etc/systemd/system/ravel.service.go-template"
13+
COPY --link --from=go / /usr/local/
14+
COPY --link --from=goreleaser / /usr/local/
15+
WORKDIR /go/src/github.com/valyentdev/ravel
16+
ARG name
17+
ARG version
18+
RUN --mount=type=cache,target=/root/go/pkg/mod <<EOF
19+
check-clone "https://github.com/valyentdev/ravel" "v${version}"
20+
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/valyentdev/ravel .
21+
goreleaser build --single-target
22+
cp \
23+
dist/ravel_linux_amd64_v1/ravel \
24+
dist/initd_linux_amd64_v1/initd \
25+
dist/ravel-proxy_linux_amd64_v1/ravel-proxy \
26+
dist/jailer_linux_amd64_v1/jailer \
27+
"${prefix}/bin/"
28+
EOF
2429

30+
RUN <<EOF
2531
"${prefix}/bin/ravel" completion bash >"${prefix}/share/bash-completion/completions/ravel"
2632
"${prefix}/bin/ravel" completion fish >"${prefix}/share/fish/vendor_completions.d/ravel.fish"
2733
"${prefix}/bin/ravel" completion zsh >"${prefix}/share/zsh/vendor-completions/_ravel"
34+
35+
"${prefix}/bin/ravel-proxy" completion bash >"${prefix}/share/bash-completion/completions/ravel-proxy"
36+
"${prefix}/bin/ravel-proxy" completion fish >"${prefix}/share/fish/vendor_completions.d/ravel-proxy.fish"
37+
"${prefix}/bin/ravel-proxy" completion zsh >"${prefix}/share/zsh/vendor-completions/_ravel-proxy"
2838
EOF

0 commit comments

Comments
 (0)