Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git
.github
*.md
LICENSE
77 changes: 77 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copilot Instructions — devops-ia/steampipe

## Project Overview

This repo maintains a community Docker image for [Steampipe](https://steampipe.io). Turbot stopped publishing official Docker images after v0.22.0, so we build from their pre-compiled binaries.

The image is a thin wrapper: it downloads the Steampipe binary, sets up the runtime environment (UID 9193, directories, env vars), and provides a default CMD.

## Architecture

```
Dockerfile → builds the image (ARG STEAMPIPE_VERSION controls version)
README.md → documents flags, env vars, quickstart, Kubernetes notes
cli-snapshot.json → machine-readable snapshot of CLI behavior (auto-generated)
scripts/ → extraction and comparison tools (do not modify)
package.json → semantic-release config (do not modify)
```

## When Upstream Releases a New Version

1. Review the behavioral diff in the PR comment
2. Update `README.md`:
- Add new CLI flags to the flag tables
- Remove deprecated/removed flags
- Add new environment variables to the env var table
- Remove dropped environment variables
- Update the version in example commands if relevant
3. Update `Dockerfile`:
- Add/remove ENV vars if defaults changed
- Update HEALTHCHECK if the service behavior changed
4. Do NOT update `ARG STEAMPIPE_VERSION` (updatecli handles this)
5. Do NOT modify `cli-snapshot.json` (CI regenerates it)

## Files You SHOULD Modify

- `README.md` — flag tables, env var tables, examples
- `Dockerfile` — ENV defaults, HEALTHCHECK, EXPOSE

## Files You MUST NOT Modify

- `.github/workflows/` — CI/CD pipelines
- `package.json` — semantic-release config
- `cli-snapshot.json` — auto-generated by CI
- `scripts/` — extraction tools
- `LICENSE`

## How to Build and Test

```bash
# Build
docker build -t steampipe:test .

# Smoke test
docker run --rm steampipe:test steampipe --version

# Service test
docker run --rm -d --name sp-test steampipe:test steampipe service start --foreground --database-listen network
sleep 10
docker exec sp-test bash -c 'echo > /dev/tcp/localhost/9193' && echo "OK"
docker stop sp-test
```

## Documentation Format

Flag tables use this format:
```markdown
| Flag | Description | Default |
|------|-------------|---------|
| `--foreground` | Run in foreground (required for containers) | — |
```

Env var tables use this format:
```markdown
| Variable | Image default | Description |
|----------|--------------|-------------|
| `STEAMPIPE_UPDATE_CHECK` | `false` | Disable update checking |
```
23 changes: 23 additions & 0 deletions .github/updatecli/steampipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bump Steampipe version

sources:
steampipe:
kind: githubRelease
spec:
owner: turbot
repository: steampipe
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
versionFilter:
kind: semver
pattern: ">=2.0.0"

targets:
dockerfile:
name: "Update Steampipe version in Dockerfile"
kind: file
sourceid: steampipe
spec:
file: Dockerfile
matchpattern: 'ARG STEAMPIPE_VERSION=.*'
replacepattern: 'ARG STEAMPIPE_VERSION={{ source "steampipe" }}'
29 changes: 29 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Copilot Setup Steps

on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install tools
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq jq > /dev/null
echo "jq $(jq --version), docker $(docker --version)"

- name: Build Docker image
run: docker build -t steampipe:local .

- name: Validate
run: docker run --rm steampipe:local steampipe --version
Loading
Loading