Skip to content

Commit 6e47128

Browse files
committed
doc: updated README
1 parent 81befb5 commit 6e47128

1 file changed

Lines changed: 78 additions & 7 deletions

File tree

README.md

Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,85 @@
1-
# rewrite-docker
1+
# Rewrite-Docker
22

3-
This is a pet project to support dockerfiles in OpenRewrite.
3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4+
[![Java Version](https://img.shields.io/badge/Java-17-blue.svg)](https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html)
5+
[![Build](https://github.com/jimschubert/rewrite-docker/actions/workflows/build.yml/badge.svg)](https://github.com/jimschubert/rewrite-docker/actions/workflows/build.yml)
6+
[![Release](https://github.com/jimschubert/rewrite-docker/actions/workflows/release.yml/badge.svg)](https://github.com/jimschubert/rewrite-docker/actions/workflows/release.yml)
47

5-
It does _not_ work well enough for you to use it. It's a work in progress. I can't promise that it will ever be finished.
68

7-
TODOs:
9+
A library that extends [OpenRewrite](https://github.com/openrewrite/rewrite) to provide Dockerfile parsing, analysis, and transformation capabilities.
810

9-
* Update all types with Right-padded literals to have simplified with* methods
10-
* Throw parser errors for invalid syntaxes or usages
11-
* Support dockerfile syntaxes
11+
## Project Status
12+
13+
⚠️ **Work in Progress** ⚠️
14+
15+
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.
16+
17+
## Overview
18+
19+
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.
20+
21+
## Features
22+
23+
* Dockerfile AST (Abstract Syntax Tree) parsing
24+
* Tree representation of Dockerfile instructions
25+
* Visitor pattern for navigating and transforming Dockerfiles
26+
27+
## Getting Started
28+
29+
### Prerequisites
30+
31+
* Java 17 or higher
32+
* Gradle or Maven (for dependency management)
33+
34+
### Installation
35+
36+
The library is available via JitPack and can be added to your project as a dependency.
37+
38+
#### Gradle
39+
40+
```groovy
41+
repositories {
42+
maven { url 'https://jitpack.io' }
43+
}
44+
dependencies {
45+
implementation 'com.github.jimschubert:rewrite-docker:1.0.4'
46+
}
47+
```
48+
49+
#### Maven
50+
51+
```xml
52+
<repositories>
53+
<repository>
54+
<id>jitpack.io</id>
55+
<url>https://jitpack.io</url>
56+
</repository>
57+
</repositories>
58+
<dependency>
59+
<groupId>com.github.jimschubert</groupId>
60+
<artifactId>rewrite-docker</artifactId>
61+
<version>1.0.4</version>
62+
</dependency>
63+
```
64+
65+
## Building
66+
67+
To build the project, you can use Gradle. Make sure you have Java 17 or higher installed.
68+
69+
```bash
70+
./gradlew build
71+
```
72+
73+
## Usage Examples
74+
_Coming soon_
75+
76+
## Development Roadmap
77+
- [ ] Add parser error handling for invalid syntaxes
78+
- [ ] Develop common Dockerfile recipes
79+
- [ ] Add documentation and usage examples
80+
81+
## Contributing
82+
Contributions are welcome! Please feel free to submit a Pull Request.
1283

1384
## License
1485

0 commit comments

Comments
 (0)