services: jupyterhub: build: context: . dockerfile: Dockerfile.hub container_name: jupyterhub image: jupyterhub-hub:latest ports: - "8000:8000" volumes: # Access to Docker socket to spawn student containers - /var/run/docker.sock:/var/run/docker.sock # JupyterHub database persistence - jupyterhub-data:/srv/jupyterhub # Mount config file directly (for easy modifications) - ./jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py:ro networks: - jupyterhub-network restart: unless-stopped environment: # Shared password for all students JUPYTERHUB_PASSWORD: metabar2025 # Optional environment variables DOCKER_NOTEBOOK_DIR: /home/jovyan/work networks: jupyterhub-network: name: jupyterhub-network driver: bridge volumes: jupyterhub-data: jupyterhub-shared: jupyterhub-course: