@dockerforge/cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -28,6 +28,15 @@ dockerforge generate ./my-app
|
|
|
28
28
|
|
|
29
29
|
## Generate
|
|
30
30
|
|
|
31
|
+
Run DockerForge from the root of the app you want to containerize:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cd ./my-app
|
|
35
|
+
npx @dockerforge/cli generate .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
It writes a `Dockerfile`, `.dockerignore`, and `docker-compose.yml` by default.
|
|
39
|
+
|
|
31
40
|
```bash
|
|
32
41
|
dockerforge generate . # write files into the current directory
|
|
33
42
|
dockerforge generate ./app -o ./out # write into a chosen directory
|
|
@@ -49,6 +58,19 @@ The default output is a coloured summary with the detected services, a confidenc
|
|
|
49
58
|
warnings. `--json` and `--print` produce plain output with no decoration. Colour turns off when
|
|
50
59
|
the output is not a terminal or when `NO_COLOR` is set.
|
|
51
60
|
|
|
61
|
+
After reviewing the generated files, build and run with Docker:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
docker build -t my-app .
|
|
65
|
+
docker run --rm -p 3000:3000 my-app
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Or use the generated Compose file:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
docker compose up --build
|
|
72
|
+
```
|
|
73
|
+
|
|
52
74
|
## Lint
|
|
53
75
|
|
|
54
76
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dockerforge/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "DockerForge CLI: generate production-grade Dockerfiles, .dockerignore, and Compose from a local project, and lint Dockerfiles (human/JSON/SARIF). Offline.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Docker Forge",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"sarif"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@dockerforge/core": "0.2.
|
|
47
|
+
"@dockerforge/core": "0.2.1",
|
|
48
48
|
"commander": "^13.1.0"
|
|
49
49
|
}
|
|
50
50
|
}
|