-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathContainerfile
More file actions
48 lines (46 loc) · 3.6 KB
/
Copy pathContainerfile
File metadata and controls
48 lines (46 loc) · 3.6 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
FROM registry.access.redhat.com/ubi9/ubi:9.8-1780376557
LABEL \
name="releng-test-product" \
com.redhat.component="releng-test-product" \
description="Test description from containerfile " \
summary="Test summary" \
io.k8s.description="Test io.k8s description from containerfile" \
io.k8s.display-name="releng-test-product" \
io.openshift.tags="releng-test-product"
RUN mkdir -p /releases && \
# Download real macOS binaries (unsigned) for testing only
curl -L https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-macos-amd64 -o /tmp/darwin-amd64 && \
curl -L https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-macos-arm64 -o /tmp/darwin-arm64 && \
# Download real Windows binaries (unsigned)
curl -L https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe -o /tmp/windows-amd64.exe && \
curl -L https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-i386.exe -o /tmp/windows-i386.exe && \
chmod +x /tmp/darwin-amd64 /tmp/darwin-arm64 /tmp/windows-amd64.exe /tmp/windows-i386.exe && \
# Create nested directory structure for darwin and windows (test preservation)
# Use SAME binary name for different architectures of same OS to test os/arch/ isolation
mkdir -p /tmp/releng-test-product-binaries-darwin-amd64 && \
mkdir -p /tmp/releng-test-product-binaries-darwin-arm64 && \
mkdir -p /tmp/releng-test-product-binaries-windows-amd64 && \
mkdir -p /tmp/releng-test-product-binaries-windows-i386 && \
# Copy binaries into nested directories - SAME name for darwin-amd64 and darwin-arm64
cp /tmp/darwin-amd64 /tmp/releng-test-product-binaries-darwin-amd64/releng-test-product-binaries && \
cp /tmp/darwin-arm64 /tmp/releng-test-product-binaries-darwin-arm64/releng-test-product-binaries && \
cp /tmp/windows-amd64.exe /tmp/releng-test-product-binaries-windows-amd64/releng-test-product-binaries.exe && \
cp /tmp/windows-i386.exe /tmp/releng-test-product-binaries-windows-i386/releng-test-product-binaries.exe && \
# Compress darwin and windows with nested directory structure preserved #
tar -czf /releases/releng-test-product-binaries-darwin-amd64.tar.gz -C /tmp releng-test-product-binaries-darwin-amd64 && \
tar -czf /releases/releng-test-product-binaries-darwin-arm64.tar.gz -C /tmp releng-test-product-binaries-darwin-arm64 && \
tar -czf /releases/releng-test-product-binaries-windows-amd64.tar.gz -C /tmp releng-test-product-binaries-windows-amd64 && \
# Windows i386: UNCOMPRESSED .tar (testing new feature)
tar -cf /releases/releng-test-product-binaries-windows-i386.tar -C /tmp releng-test-product-binaries-windows-i386 && \
# Linux archives: flat structure (no nesting) - same binary name for both architectures
echo 'hello world amd64' > /tmp/releng-test-product-binaries && \
tar -czf /releases/releng-test-product-binaries-linux-amd64.tar.gz -C /tmp releng-test-product-binaries && \
echo 'hello world arm64' > /tmp/releng-test-product-binaries && \
tar -czf /releases/releng-test-product-binaries-linux-arm64.tar.gz -C /tmp releng-test-product-binaries && \
# Create fake disk image files directly in /releases/ (no tar.gz wrapping)
echo 'fake ISO content for amd64' > /releases/install.iso.gz && \
echo 'fake QCOW content for amd64' > /releases/disk.qcow2 && \
echo 'fake ISO content for arm64' > /releases/install-arm64.iso.gz && \
echo 'fake QCOW content for arm64' > /releases/disk-arm64.qcow2 && \
# Clean up
rm -rf /tmp/darwin-amd64 /tmp/darwin-arm64 /tmp/windows-amd64.exe /tmp/windows-i386.exe /tmp/releng-test-product-binaries /tmp/releng-test-product-binaries-*