Docker Setup and Website Preview Guide
Explains how to run a Jekyll-based research lab website locally via Docker and preview it on localhost:8080.
What this file does
Explains how to run a Jekyll-based research lab website locally via Docker and preview it on localhost:8080.
When to use it
- Setting up a local development environment for an al-folio Jekyll site
- Troubleshooting Docker container issues during website preview
- Learning the Docker workflow for Jekyll projects with LiveReload
- Onboarding new contributors to a research lab website repository
Assumes this stack
Docker Setup and Website Preview Guide
Overview
This guide explains how to run the AI & Mobility Research Lab website locally using Docker and preview it at http://localhost:8080.
Prerequisites
- Docker Desktop installed and running
- Git repository cloned locally
- Terminal/Command Prompt access
Quick Start
1. Navigate to Project Directory
cd yiqiao-li.github.io
2. Start Docker Container
docker-compose up -d
3. Access Website
Open your web browser and navigate to:
http://localhost:8080
Detailed Instructions
Docker Configuration
The project includes pre-configured Docker files:
- Dockerfile: Defines the Jekyll environment
- docker-compose.yml: Orchestrates the container setup
Key Configuration:
- Image:
amirpourmand/al-folio:v0.13.4(pre-built Jekyll image) - Port Mapping:
8080:8080(local:container) - LiveReload:
35729:35729for automatic browser refresh - Volume Mounting: Local files mounted to
/srv/jekyll - Environment: Development mode enabled
Container Management
Check Status
docker-compose ps
View Logs
docker-compose logs jekyll
Stop Container
docker-compose down
Restart Container
docker-compose restart
Rebuild Container (if needed)
docker-compose up --build
Website Features
Available Pages
- Home: Lab overview and PI profile
- Research: Current and past projects
- Publications: Academic papers and citations
- People: Team members and profiles
- Teaching: Course information
- Service: Professional activities
Technical Features
- ✅ Responsive Design: Works on desktop, tablet, mobile
- ✅ Light/Dark Mode: Toggle between themes
- ✅ Live Reload: Automatic browser refresh on file changes
- ✅ MathJax Support: Mathematical notation rendering
- ✅ BibTeX Integration: Publication management
- ✅ GitHub Integration: Repository statistics
- ✅ Search Functionality: Site-wide content search
Troubleshooting
Common Issues
Port Already in Use
Problem: Error: Port 8080 is already in use
Solution:
- Change port in
docker-compose.yml:ports: - 8081:8080 # Use port 8081 instead - Access website at
http://localhost:8081
Container Won't Start
Problem: Container fails to start Solutions:
- Ensure Docker Desktop is running
- Check available disk space
- Restart Docker Desktop
- Run
docker system pruneto clean up
Website Not Loading
Problem: Browser shows connection error Solutions:
- Wait 30-60 seconds for Jekyll build to complete
- Check container logs:
docker-compose logs jekyll - Verify container is running:
docker-compose ps
File Changes Not Reflecting
Problem: Updates not showing in browser Solutions:
- Ensure LiveReload is working (port 35729)
- Hard refresh browser (Ctrl+F5)
- Check file permissions
- Restart container:
docker-compose restart
Performance Optimization
Build Time
- Initial build: ~30-60 seconds
- Subsequent builds: ~5-15 seconds
- File changes: Near-instant with LiveReload
Resource Usage
- Memory: ~500MB-1GB
- CPU: Low usage during idle
- Disk: ~2-5GB for container and dependencies
Development Workflow
Making Changes
- Edit files in your local directory
- Changes automatically detected by Jekyll
- Browser refreshes automatically (LiveReload)
- No manual restart required for most changes
File Types Supported
- Markdown:
.mdfiles for content - Liquid Templates:
.liquidfiles for layouts - SCSS/CSS: Styling files
- JavaScript: Interactive features
- Images: JPG, PNG, GIF, WebP formats
Recommended Tools
- Code Editor: VS Code, Sublime Text, or similar
- Browser: Chrome, Firefox, Safari, Edge
- Terminal: Command Prompt, PowerShell, or Git Bash
Alternative Access Methods
If localhost doesn't work, try:
http://127.0.0.1:8080http://0.0.0.0:8080- Your machine's IP address:
http://[YOUR_IP]:8080
Security Notes
- Container runs in development mode
- No production security measures enabled
- Intended for local development only
- Don't expose to public networks
Cleanup
Stop and Remove Container
docker-compose down
Remove All Related Data
docker-compose down -v
docker system prune -f
Support
For issues related to:
- Docker: Check Docker Desktop documentation
- Jekyll: Refer to Jekyll documentation
- al-folio Theme: Check the al-folio repository
- Website Content: Contact the lab PI, Dr. Yiqiao Li
Last Updated: August 2024
Version: 1.0
Maintained By: AI & Mobility Research Lab
What's inside
8 sections: overview, prerequisites, quick start, detailed instructions, troubleshooting, development workflow, alternative access, cleanup
Change this for your project
- Replace
yiqiao-li.github.iowith your own repository name in the navigation command - Replace
amirpourmand/al-folio:v0.13.4with your own Docker image if using a different Jekyll base - Replace
Dr. Yiqiao Liwith your own lab PI or maintainer name in the support section
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Port conflict resolution by remapping in docker-compose.yml
- LiveReload setup for automatic browser refresh on file changes
Related Documents
Incident Response Runbooks - Deal Scout
Defines step-by-step procedures for 9 incident types plus a rollback and escalation policy for a Docker-based deal-scraping service.
Document Preview & Download Feature - Complete Guide
Adds document preview and download endpoints that retrieve files from MinIO and serve them through the application with caching and security.
On-Call Policy
Defines a weekly on-call rotation, escalation matrix, paging procedures, and shift handoff process for engineering teams.
SRO-001 On-Call & Incident Response
Defines a complete on-call schedule, incident severity levels, response procedures, and post-incident analysis workflow for SRE teams.