Skip to content

Conversation

@ImperatorMarsa
Copy link

Description

This PR adds Docker support to simplify running the application and includes GitHub Actions for automated Docker image builds.

Fixes #5

Changes Proposed

  • Added Dockerfile - Containerizes the application for consistent execution
  • Added GitHub Actions workflow (.github/workflows/docker.yml)
  • Automatically builds and publishes Docker images on releases
  • Updated README.md - Added comprehensive Docker documentation

Docker Features

  • Pre-built images available via docker pull ghcr.io/sakura-sx/typr:latest
  • Manual build instructions for custom deployments

Testing

  • Docker image builds successfully: docker build -t app .
  • Application runs in container: docker run --rm app [args]
  • GitHub Actions workflow validates Docker build

Documentation

  • Added "Running with Docker" section to README
  • Included both pre-built image and manual build instructions

Notes

  • Non-breaking change - existing setup methods remain fully functional
  • Docker support is optional addition
  • Images are automatically published to GitHub Container Registry on releases

The application can now be run in an isolated Docker container.
A "Running with Docker" subsection has been added to the Usage section
with command examples:
- Building a Docker image
- Basic container launch
- Launching with additional parameters

Now users can easily run an application in a Docker container
without having to install dependencies on the system.
…hing Docker images.

A `.github/workflows/docker.yml` file has been created that:
- Automatically runs on pushes to main, v* tags, and pull requests
- Builds a Docker image using Buildx
- Automatically logs into the GitHub Container Registry
- Generates tags for images based on:
- Branch (for main)
- PR number
- Tag semver (v1.0.0 -> 1.0.0, 1.0)
- Commit SHA
- Uses caching to speed up builds
- Publishes the image only on pushes (not on pull requests)

Images are now automatically built and published to GHCR with every code
change.
- Added 'latest' tag generation for pushes to main branch
- Updated docker/metadata-action configuration with raw type tag
- Tag 'latest' will now be published alongside other tags when pushing
to main

This ensures that the most recent stable build is always accessible with
the 'latest' tag, improving developer experience and deployment
workflows.
…image.

In the "Running with Docker" section, a section has been added for using
a pre-built image:
- The pre-built image `ghcr.io/imperatormarsa/typr` is specified.
- Added example commands for running the latest version.
- Separated instructions into the recommended method (pre-built image)
and building from source.

Now users can run the application directly without having to build an
image.
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.

[FEATURE] Add Docker Support for Simplified Execution

2 participants