Skip to content

Add Docker-based development environment with optimized CI#254

Open
chorrell wants to merge 1 commit intomainfrom
feature/docker-dev-environment
Open

Add Docker-based development environment with optimized CI#254
chorrell wants to merge 1 commit intomainfrom
feature/docker-dev-environment

Conversation

@chorrell
Copy link
Owner

@chorrell chorrell commented Mar 3, 2026

Overview

This PR adds a Docker-based development environment using official tool images. Developers only need Docker installed to run linters and formatters.

Changes

Makefile Targets

New Makefile with convenient targets:

  • make lint - Run all linters (shellcheck, shfmt, markdownlint)
  • make format - Auto-fix shell script formatting
  • make shellcheck, make shfmt, make markdown-lint - Run individual tools
  • make help - List all targets

Official Docker Images

Uses well-maintained official images:

  • mvdan/shfmt:v3 - Shell script formatter
  • koalaman/shellcheck:stable - Shell linter
  • node:lts-alpine - For markdownlint-cli2

GitHub Actions CI

Simplified checkshell.yml using GitHub Actions:

  • Native actions for shellcheck and shfmt (no Docker overhead)
  • DavidAnson/markdownlint-cli2-action for markdown linting
  • Jobs run in parallel

Updated Documentation

  • SETUP.md - Simplified guide for Docker-based workflow
  • AGENTS.md - Updated with Docker development section
  • .pre-commit-config.yaml - Uses official Docker images

Benefits

Simple: No custom Dockerfile - just use official images
Maintainable: Update tools by changing image tags
Consistent: Same official images for local dev and CI
Zero Setup: Only Docker required
Faster CI: GitHub Actions run natively without Docker overhead
Auto-Updates: Using stable/lts tags stays current

File Changes

  • Added: Makefile
  • Modified: .github/workflows/checkshell.yml, .pre-commit-config.yaml, SETUP.md, AGENTS.md
  • Removed: Dockerfile.dev (no longer needed)

Breaking Changes

None. This is purely additive and more maintainable than the previous approach.

@chorrell chorrell force-pushed the feature/docker-dev-environment branch 2 times, most recently from 80665e1 to 6bddf9a Compare March 6, 2026 16:53
Features:
- Makefile targets for running linting tools via official Docker images
  - mvdan/shfmt:v3 for shell script formatting
  - koalaman/shellcheck:stable for shell linting
  - node:lts-alpine with markdownlint-cli2 for markdown validation
- No custom Dockerfile needed - uses well-maintained official images
- Simplified pre-commit configuration with Docker-based hooks
- Updated SETUP.md and AGENTS.md for simplified Docker workflow
- Reverted CI workflow to GitHub Actions (checkshell.yml)
  - Native shfmt and shellcheck actions
  - DavidAnson/markdownlint-cli2-action for markdown linting
  - Jobs run in parallel without Docker overhead

Benefits:
- Developers only need Docker installed
- Official tool images always available from maintainers
- No build step required - images pulled on demand
- Consistent tool versions across local dev and CI
- Simpler to maintain - just update image tags
- Faster CI with native GitHub Actions
- Automatic updates by using stable/lts tags
@chorrell chorrell force-pushed the feature/docker-dev-environment branch from 6bddf9a to a2c1d1f Compare March 7, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant