https://github.com/jimschubert/rewrite-docker
A pet project for playing around with Docker parsing in OpenRewrite
https://github.com/jimschubert/rewrite-docker
Last synced: over 1 year ago
JSON representation
A pet project for playing around with Docker parsing in OpenRewrite
- Host: GitHub
- URL: https://github.com/jimschubert/rewrite-docker
- Owner: jimschubert
- License: apache-2.0
- Created: 2025-04-02T03:15:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-17T03:21:43.000Z (over 1 year ago)
- Last Synced: 2025-04-17T17:34:58.964Z (over 1 year ago)
- Language: Java
- Size: 328 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rewrite-Docker
[](https://opensource.org/licenses/Apache-2.0)
[](https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html)
[](https://github.com/jimschubert/rewrite-docker/actions/workflows/build.yml)
A library that extends [OpenRewrite](https://github.com/openrewrite/rewrite) to provide Dockerfile parsing, analysis, and transformation capabilities.
## Project Status
⚠️ **Work in Progress** ⚠️
This is a pet project currently under development. It does **not** work well enough for production use yet. There is no guarantee that it will be completed or maintained long-term.
## Overview
Rewrite-Docker aims to bring the power of OpenRewrite's AST-based transformation to Dockerfiles. This enables programmatic analysis and refactoring of Docker configuration files.
## Features
* Dockerfile AST (Abstract Syntax Tree) parsing
* Tree representation of Dockerfile instructions
* Visitor pattern for navigating and transforming Dockerfiles
## Getting Started
### Prerequisites
* Java 17 or higher
* Gradle
### Installation
The library is available via JitPack and can be added to your project as a dependency.
#### Gradle
```groovy
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.jimschubert:rewrite-docker:1.0.4'
}
```
#### Maven
```xml
jitpack.io
https://jitpack.io
com.github.jimschubert
rewrite-docker
1.0.4
```
## Building
To build the project, you can use Gradle. Make sure you have Java 17 or higher installed.
```bash
./gradlew :spotlessApply build
```
## Usage Examples
_Coming soon_
## Development Roadmap
- [ ] Add parser error handling for invalid syntaxes
- [ ] Develop common Dockerfile recipes
- [ ] Add documentation and usage examples
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the [Apache License, Version 2.0](LICENSE).