- Install uv from astral-sh/uv for Python package management - Update entrypoint.sh to handle CMD argument and delegate to exec - Set default CMD to "caddy" in Dockerfile - Update task script to pull latest build image and set CI=true for pnpm install
layout, permalink
| layout | permalink |
|---|---|
| layouts/base.njk | /image/ |
taskfile.build
The taskfile.build Docker image runs any project.
Source: https://git.taskfile.build/src/branch/main/image
Usage
Setup environment variables:
export GIT_URL="https://git.taskfile.build" # required
export TASK_COMMANDS="install,build" # required if task file exists
export CADDY_ROOT="_site" # default is path to the repo
Run the tasfile.buld image:
run() {
echo "Open http://localhost:8080 in your browser"
docker rm -f taskfile-build
docker run -p 8080:80 -d \
--name taskfile-build \
-e GIT_URL="https://git.taskfile.build" \
-e TASK_COMMANDS="install,build-11ty" \
-e CADDY_ROOT="_site" \
-v taskfile-build:/app \
janikvonrotz/taskfile.build:latest
}
The entrypoint script of the container will clone the project from git url. If the project is already cloned it will pull the origin. Afterwards it runs each command in the root of the cloned repository with the task file ./task <command>. Finally the Caddy webserver is started that serves static content from the root path.