Sign inSign up

sgkens/phellams-automator

By sgkens

Updated 3 days ago

Phellams-Automator is a multi-language build environment based on Debian-12-slim.

Image
Developer tools
1

6.6K

sgkens/phellams-automator repository overview

SEE: phellams-automator

Image Information

The image starts PowerShell when no command is supplied:

# Bash, Zsh, or WSL
docker run --rm docker.io/sgkens/phellams-automator:latest

Print the installed runtime and module information:

# Bash, Zsh, or WSL
docker run --rm docker.io/sgkens/phellams-automator:latest \
  pwsh -NoProfile -Command \
  'Get-Module -ListAvailable | Sort-Object Name, Version | Format-Table Name, Version'
Mounting the Current Project

Use /workspace as the container path and set it as the working directory:

# Bash, Zsh, or WSL
docker run --rm --interactive --tty \
  --volume "$(pwd):/workspace" \
  --workdir /workspace \
  docker.io/sgkens/phellams-automator:latest
# Windows, macOS, or Linux PowerShell
docker run --rm --interactive --tty `
  --volume "${PWD}:/workspace" `
  --workdir /workspace `
  docker.io/sgkens/phellams-automator:latest

Docker Desktop must have WSL integration enabled when these commands are run from a WSL distribution.

Running a Project Script
# Bash, Zsh, or WSL
docker run --rm \
  --volume "$(pwd):/workspace" \
  --workdir /workspace \
  docker.io/sgkens/phellams-automator:latest \
  pwsh -NoProfile -File ./myscript.ps1
PowerShell Test and Build Commands

PowerShell cmdlets must be passed to pwsh -Command; they are not standalone Linux executables.

# Run all Pester tests below ./tests
docker run --rm \
  --volume "$(pwd):/workspace" \
  --workdir /workspace \
  docker.io/sgkens/phellams-automator:latest \
  pwsh -NoProfile -Command 'Invoke-Pester -Path ./tests'

# Analyze all PowerShell files in the project
docker run --rm \
  --volume "$(pwd):/workspace" \
  --workdir /workspace \
  docker.io/sgkens/phellams-automator:latest \
  pwsh -NoProfile -Command 'Invoke-ScriptAnalyzer -Path . -Recurse'

# Return the GitAutoVersion version
docker run --rm \
  --volume "$(pwd):/workspace" \
  --workdir /workspace \
  docker.io/sgkens/phellams-automator:latest \
  pwsh -NoProfile -Command '(Get-GitAutoVersion).Version'

# Return a version calculated from Conventional Commits
docker run --rm \
  --volume "$(pwd):/workspace" \
  --workdir /workspace \
  docker.io/sgkens/phellams-automator:latest \
  pwsh -NoProfile -Command 'Get-ConventionalCommitVersion'

The bundled custom modules export the following commands:

ModuleExported commands
ColorConsoleNew-ColorConsole, Write-Color
ConventionalCommitVersionGet-ConventionalCommitVersion
CSVerifyNew-CheckSum, New-VerificationFile, Read-CheckSum, Test-Verification
GitAutoVersionGet-GitAutoVersion
NupsforgeNew-ChocoNuspecFile, New-ChocoPackage, New-NupkgIcon, New-NupkgPackage, New-NuspecPackageFile
PHWriterNew-PHWriter, Write-PHAsciiLogo
PsmpackerBuild-Module
QuicklogGet-QuicklogTypes, New-Quicklog, Write-Quicklog, Write-QuicklogProgress
ShellDockNew-ShellDock
TadpolClear-Prelines, Get-TPThemes, New-TPObject, Write-TPProgress

Inspect a command's syntax and examples before using it:

# Replace Build-Module with any exported command listed above
docker run --rm docker.io/sgkens/phellams-automator:latest \
  pwsh -NoProfile -Command 'Get-Help Build-Module -Full'
Native Toolchain Commands

All examples mount the current project at /workspace.

# .NET
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest dotnet build

# NuGet
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest nuget pack ./package.nuspec

# Bun
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest bun test

# Node.js and npm
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest npm test

# Go
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest go test ./...

# Rust
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest rustc --version

# Elixir
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest elixir --version

# Ruby and Jekyll
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest bundle exec jekyll build

# PHP and Composer
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest composer install

# Inkscape
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest \
  inkscape ./image.svg --export-filename=./image.png

# ImageMagick
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest \
  convert ./image.png -resize 50% ./image-small.png

# jq and yq
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest jq . ./data.json
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest yq . ./data.yaml

# Codecov and Coveralls
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest codecov --help
docker run --rm -v "$(pwd):/workspace" -w /workspace \
  docker.io/sgkens/phellams-automator:latest coveralls --help

Tag summary

Content type

Image

Digest

sha256:2884958b9

Size

2.4 GB

Last updated

3 days ago

docker pull sgkens/phellams-automator