# Dockerfile per Lab 03 - Compute & EC2
# Container di test con strumenti di stress per verifica enforcement

FROM alpine:3.19

# Creare utente non-root per sicurezza (INF-01 compliance)
RUN addgroup -g 1000 appgroup && \
    adduser -D -u 1000 -G appgroup appuser

# Installare strumenti di stress testing e monitoraggio
RUN apk add --no-cache \
    stress \
    curl \
    wget \
    procps \
    && rm -rf /var/cache/apk/*

# Passare all'utente non-root
USER appuser

# Set working directory
WORKDIR /home/appuser

# Comando di default - container in attesa per testing
CMD ["sh", "-c", "sleep 3600"]
