Files
assignment01/assignments.sh
2025-11-18 03:20:27 +00:00

21 lines
429 B
Bash

#!/bin/bash
set -e
# Update and install docker
apt update -y
apt install -y docker.io
# Enable & start Docker
systemctl enable docker
systemctl start docker
# Wait for docker daemon to be ready
tries=0
while ! docker info >/dev/null 2>&1; do
tries=$((tries+1))
echo "Waiting for Docker... ($tries)"
sleep 30
done
# Run the helloworld container
docker run -d --name hello -p 80:8080 testcontainers/helloworld:1.2.0