build-labels 0.0.73 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/install-docker-static +63 -15
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ecd674454bd34e82b1e1d45099b54e103789ea67e652dffe72768a435bdbb12
|
|
4
|
+
data.tar.gz: 4b85d9c6f682ad319a578e516e501d5858ffad8d45e5c5dc25164c1e6693cdd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e3b0bf903e26ec82fb5e87c85fd45d5750098cad96618364c934f81790e25a1d816dc3e493045da133350ae4587c347cc81b5955c448639d0412b668b4880a4
|
|
7
|
+
data.tar.gz: 6a0e285f6b9f5cef615f6d0b9d23b2f04bb285b436c247685b378d1c76850b6114b402605725c58074e96751fdf5456ba4767fe37fdb7d3f450effd2141d1dc8
|
data/bin/install-docker-static
CHANGED
|
@@ -1,9 +1,45 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
text = File.read(__FILE__)
|
|
3
|
+
shell = text.split(/^__END__\s*$/ , 2)[1] or abort("missing __END__")
|
|
4
|
+
exec "sh", "-eux", "-c", shell, "sh", *ARGV
|
|
5
|
+
|
|
4
6
|
__END__
|
|
5
7
|
set -eux
|
|
6
8
|
|
|
9
|
+
detect_arch() {
|
|
10
|
+
arch="$(uname -m)"
|
|
11
|
+
case "$arch" in
|
|
12
|
+
x86_64|amd64)
|
|
13
|
+
docker_arch="x86_64"
|
|
14
|
+
buildx_arch="amd64"
|
|
15
|
+
;;
|
|
16
|
+
aarch64|arm64)
|
|
17
|
+
docker_arch="aarch64"
|
|
18
|
+
buildx_arch="arm64"
|
|
19
|
+
;;
|
|
20
|
+
armv7l|armv7)
|
|
21
|
+
docker_arch="armhf"
|
|
22
|
+
buildx_arch="arm-v7"
|
|
23
|
+
;;
|
|
24
|
+
armv6l|armv6)
|
|
25
|
+
docker_arch="armel"
|
|
26
|
+
buildx_arch="arm-v6"
|
|
27
|
+
;;
|
|
28
|
+
ppc64le)
|
|
29
|
+
docker_arch="ppc64le"
|
|
30
|
+
buildx_arch="ppc64le"
|
|
31
|
+
;;
|
|
32
|
+
s390x)
|
|
33
|
+
docker_arch="s390x"
|
|
34
|
+
buildx_arch="s390x"
|
|
35
|
+
;;
|
|
36
|
+
*)
|
|
37
|
+
echo "Unsupported architecture: $arch" >&2
|
|
38
|
+
exit 1
|
|
39
|
+
;;
|
|
40
|
+
esac
|
|
41
|
+
}
|
|
42
|
+
|
|
7
43
|
# Dockerfile:
|
|
8
44
|
#FROM ruby:3.4.4-slim-bookworm AS base
|
|
9
45
|
#FROM ruby:3.2.10-alpine AS base
|
|
@@ -24,19 +60,7 @@ set -eux
|
|
|
24
60
|
# && docker -v
|
|
25
61
|
|
|
26
62
|
install_docker_static() {
|
|
27
|
-
|
|
28
|
-
case "$arch" in
|
|
29
|
-
x86_64|amd64) docker_arch="x86_64" ;;
|
|
30
|
-
aarch64|arm64) docker_arch="aarch64" ;;
|
|
31
|
-
armv7l|armv7) docker_arch="armhf" ;;
|
|
32
|
-
armv6l|armv6) docker_arch="armel" ;;
|
|
33
|
-
ppc64le) docker_arch="ppc64le" ;;
|
|
34
|
-
s390x) docker_arch="s390x" ;;
|
|
35
|
-
*)
|
|
36
|
-
echo "Unsupported architecture: $arch" >&2
|
|
37
|
-
exit 1
|
|
38
|
-
;;
|
|
39
|
-
esac
|
|
63
|
+
detect_arch
|
|
40
64
|
base_url="https://download.docker.com/linux/static/stable/$docker_arch/"
|
|
41
65
|
latest_version="$(
|
|
42
66
|
curl -fsSL "$base_url" \
|
|
@@ -55,14 +79,38 @@ install_docker_static() {
|
|
|
55
79
|
rm -rf "$tmp_dir"
|
|
56
80
|
}
|
|
57
81
|
|
|
82
|
+
install_buildx() {
|
|
83
|
+
detect_arch
|
|
84
|
+
buildx_version="${BUILDX_VERSION:-}"
|
|
85
|
+
if [ -z "$buildx_version" ]; then
|
|
86
|
+
buildx_version="$(
|
|
87
|
+
curl -fsSL https://api.github.com/repos/docker/buildx/releases/latest \
|
|
88
|
+
| sed -n 's/.*"tag_name": "\(v[0-9.]*\)".*/\1/p' \
|
|
89
|
+
| head -n 1
|
|
90
|
+
)"
|
|
91
|
+
fi
|
|
92
|
+
if [ -z "$buildx_version" ]; then
|
|
93
|
+
echo "Unable to determine latest buildx version" >&2
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
plugin_dir="/usr/local/lib/docker/cli-plugins"
|
|
97
|
+
mkdir -p "$plugin_dir"
|
|
98
|
+
curl -fsSL \
|
|
99
|
+
-o "$plugin_dir/docker-buildx" \
|
|
100
|
+
"https://github.com/docker/buildx/releases/download/${buildx_version}/buildx-${buildx_version}.linux-${buildx_arch}"
|
|
101
|
+
chmod 0755 "$plugin_dir/docker-buildx"
|
|
102
|
+
}
|
|
103
|
+
|
|
58
104
|
if command -v apt-get >/dev/null 2>&1; then
|
|
59
105
|
apt-get update
|
|
60
106
|
apt-get install -y --no-install-recommends git ca-certificates curl tar
|
|
61
107
|
install_docker_static
|
|
108
|
+
install_buildx
|
|
62
109
|
rm -rf /var/lib/apt/lists/*
|
|
63
110
|
elif command -v apk >/dev/null 2>&1; then
|
|
64
111
|
apk add --no-cache git ca-certificates curl tar
|
|
65
112
|
install_docker_static
|
|
113
|
+
install_buildx
|
|
66
114
|
else
|
|
67
115
|
echo "Unsupported package manager: expected apt or apk." >&2
|
|
68
116
|
exit 1
|
data/lib/version.rb
CHANGED