A Dockerfile for AWS Image Builders Built in Go. A declarative spec for AWS AppStream images. Appstreamfile defines everything that goes into an image, while your automation system handles execution.
AWS AppStream provides a CLI, but it only handles high-level image operations like updating stack applications or building images. The real pain is preparing the image itself. Its the installers, custom scripts, environment tweaks, catalog entries, and session scripts. Doing this by hand or via plain scripting is messy and impossible to audit cleanly.
Appstreamfile is the missing piece. It acts like a Dockerfile for AppStream image builders. Install it inside the image builder instance with your favorite automation of choice, point it to a config file, and execute. Your image becomes reproducible, reviewable, and predictable.
- Single config file describing the image
- Scripted installers
- App catalog configuration
- System/user session scripts
- File provisioning
- Declarative image metadata
- Registry Configs
- Scaffolded startup Apps - Customise your app startup
- S3 and Git backend support
- State persistence within image builders
You can install and run AppStreamFile without cloning the repository.
The script detects your system architecture and downloads the correct binary automatically.
iex (iwr https://raw.githubusercontent.com/aslamcodes/appstreamfile/main/win_install.ps1 -UseBasicParsing); Install-AppStreamFile v0.2.0Supported in future releases
Use local backend source when the config file is within image builders. S3, Git Support is WIP
appstreamfile -source local -location config.yamlplatform: "windows"
installers:
- executable: "powershell"
installScript: |
Write-Host "Hello World"
- executable: "powershell"
installScript: |
echo "Setting up environment"
catalog:
- name: "Notepad"
path: "C:\\Windows\\System32\\notepad.exe"
display_name: "Notepad"
parameters: ""
icon_path: "C:\\Windows\\System32\\notepad.exe"
working_dir: "C:\\Windows\\System32"
files:
- path: "C:\\AppStream\\Scripts\\Start-System.ps1"
content: |
Write-EventLog -LogName Application -Source AppStream -EventID 100 -Message "System session start"
- path: "C:\\AppStream\\Scripts\\Start-User.ps1"
content: |
Write-Host "User profile initialization"
- path: "C:\\AppStream\\Scripts\\End-System.ps1"
content: |
Write-EventLog -LogName Application -Source AppStream -EventID 200 -Message "System cleanup"
- path: "C:\\AppStream\\Scripts\\End-User.ps1"
content: |
Write-Host "User session cleanup"
session_scripts:
session_start:
executables:
- context: "system"
filename: "C:\\AppStream\\Scripts\\Start-System.ps1"
arguments: "-Init"
s3LogEnabled: true
- context: "user"
filename: "C:\\AppStream\\Scripts\\Start-User.ps1"
arguments: "-UserSetup"
s3LogEnabled: true
waitingTime: 60
session_termination:
executables:
- context: "system"
filename: "C:\\AppStream\\Scripts\\End-System.ps1"
arguments: "-Cleanup"
s3LogEnabled: true
- context: "user"
filename: "C:\\AppStream\\Scripts\\End-User.ps1"
arguments: "-CleanupUser"
s3LogEnabled: true
waitingTime: 60
image:
name: "example_image"
display_name: "example image"
description: "example image"
enable_dynamic_app_catalog: true
use_latest_agent_version: false
tags:
- team:infra
- env:dev
dry_run: false