This directory contains the configuration files for a fully reproducible computational environment using Docker. A pre-built image is published on Docker Hub, so end users do not need to build anything locally — just pull and run.
Dockerfile: Defines how the image was built (included for transparency). End users do not need this file.docker-compose.yml: Pulls the pre-built image from Docker Hub and starts the container.start.bat/start.sh: One-click launcher scripts for Windows and Unix-like systems (macOS, Linux).stop.bat/stop.sh: Scripts to pause the running container (data is preserved inside).
- Docker: Download and install Docker Desktop and make sure it is running.
-
Open a Terminal/Command Prompt and navigate to this
docker/directory:cd docker -
Launch the Environment:
- Windows: Double-click
start.bat, or runstart.batin the terminal. - macOS/Linux: Run
./start.sh(you may needchmod +x start.shfirst).
- Windows: Double-click
-
Access RStudio:
- The script waits ~30 seconds for initialization, then opens
http://127.0.0.1:8787in your browser. - No login is required (
DISABLE_AUTH=true). - All project files are available inside the container at
/home/rstudio/.
- The script waits ~30 seconds for initialization, then opens
-
Verify Reproducibility:
- In the RStudio Terminal, run:
quarto render
- The rendered manuscript will be generated in the
docs/directory.
- In the RStudio Terminal, run:
-
Stop the Environment:
- Windows: Double-click
stop.bat, or runstop.bat. - macOS/Linux: Run
./stop.sh. - The container is paused (not deleted). Run
startagain to resume.
- Windows: Double-click
If you prefer not to use the helper scripts:
Using Docker Compose:
cd docker
docker compose up -d # Start the container
docker compose stop # Pause the container
docker compose down # Stop and remove the containerUsing Docker directly:
docker pull phdpablo/smart-cfa:4.5.2
docker run -d --name smart-cfa -p 127.0.0.1:8787:8787 -e DISABLE_AUTH=true phdpablo/smart-cfa:4.5.2- The image
phdpablo/smart-cfa:4.5.2is self-contained: all project files, R packages (viarenv), and LaTeX dependencies are embedded. - No volume mounts are needed — the repository files are already inside the image.
- On first start, LaTeX formats are regenerated (~30 seconds) via the
init-latex.shscript. - The
Dockerfileis included in the repository for full transparency on how the image was built. You can uncomment thebuild:section indocker-compose.ymlto rebuild locally if desired.
- Docker not running: Start Docker Desktop before running the scripts.
- Port 8787 in use: Stop any other service using that port, or edit
docker-compose.ymlto change the host port (e.g.,127.0.0.1:8788:8787). - First run is slow: The image download (~2–4 GB) and LaTeX format sync take time on the first run. Subsequent starts are fast.
- Container logs: Run
docker compose logsin this directory to inspect issues.