@dockerforge/cli 0.1.3 → 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 +23 -1
- package/package.json +6 -3
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
|
|
@@ -91,7 +113,7 @@ any SARIF viewer. Full detail for each rule is in the [rules reference](https://
|
|
|
91
113
|
| Code | Meaning |
|
|
92
114
|
| --- | --- |
|
|
93
115
|
| `0` | Success. |
|
|
94
|
-
| `1` | An error. The
|
|
116
|
+
| `1` | An error. The human error line includes a typed code when one is available, for example `PATH_NOT_FOUND`. |
|
|
95
117
|
|
|
96
118
|
## Use in CI
|
|
97
119
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dockerforge/cli",
|
|
3
|
-
"version": "0.1
|
|
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",
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"dockerforge": "src/index.js"
|
|
18
18
|
},
|
|
19
19
|
"main": "src/index.js",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./src/index.js"
|
|
22
|
+
},
|
|
20
23
|
"files": [
|
|
21
24
|
"src",
|
|
22
25
|
"LICENSE",
|
|
@@ -41,7 +44,7 @@
|
|
|
41
44
|
"sarif"
|
|
42
45
|
],
|
|
43
46
|
"dependencies": {
|
|
44
|
-
"@dockerforge/core": "
|
|
45
|
-
"commander": "^
|
|
47
|
+
"@dockerforge/core": "0.2.1",
|
|
48
|
+
"commander": "^13.1.0"
|
|
46
49
|
}
|
|
47
50
|
}
|