-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.sh
More file actions
executable file
·27 lines (24 loc) · 893 Bytes
/
demo.sh
File metadata and controls
executable file
·27 lines (24 loc) · 893 Bytes
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
#!/bin/bash
echo "=== Bazel OCI Container Demo ==="
echo ""
echo "Building the container..."
bazel build //:dhi_alpine_app_tarball --platforms=//platforms:linux_amd64
if [ $? -eq 0 ]; then
echo "✅ Build successful!"
echo ""
echo "Container tarball created at: bazel-bin/dhi_alpine_app_tarball/tarball.tar"
echo "Size: $(ls -lh bazel-bin/dhi_alpine_app_tarball/tarball.tar | awk '{print $5}')"
echo ""
echo "To test with Docker:"
echo " 1. Load the image:"
echo " docker load < bazel-bin/dhi_alpine_app_tarball/tarball.tar"
echo ""
echo " 2. Run the container (will display hello.txt due to entrypoint):"
echo " docker run --rm dhi-alpine-app:latest"
echo ""
echo " 3. Run with custom command:"
echo " docker run --rm --entrypoint=\"\" dhi-alpine-app:latest ls -la /app"
else
echo "❌ Build failed!"
exit 1
fi