Dockerfile41 lines · 1235 chars # syntax=docker/dockerfile:1
FROM ubuntu:jammy-20260509
LABEL maintainer="Live Machine Learning Class" \
description="Static view of MATLAB notes on container with Python HTTP server"
ENV DATA_DIR=/data
# Install lightweight dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bash \
ca-certificates \
python3 \
python3-venv \
python3-pip \
curl \
&& rm -rf /var/lib/apt/lists/*
# Ensure /bin/sh is bash to satisfy smoke tests
RUN ln -sf /bin/bash /bin/sh
# Create data directory
RUN mkdir -p /data
# Copy repository contents
COPY . /data
# Set workdir
WORKDIR /data
# Simple build step: generate a basic index.html linking to the files directory
RUN set -e \
&& printf '<!doctype html><html><head><meta charset="utf-8"><title>Live ML Class Notes</title></head><body><h1>Live Machine Learning Class Notes</h1><p>This repository contains PDFs, PPTX, and notebooks. Browse the files in the <a href="/files/">files</a> directory.</p></body></html>' > index.html
# Expose port for static serving
EXPOSE 8000
# Use Python's built-in HTTP server to serve the docs
CMD ["bash","-lc","python3 -m http.server 8000 --directory /data"]