@enjoys/context-engine 1.0.7 → 1.0.9

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.
@@ -3,111 +3,293 @@
3
3
  "definitions": {
4
4
  "FROM": {
5
5
  "signature": "FROM [--platform=<platform>] <image>[:<tag>|@<digest>] [AS <name>]",
6
- "description": "Initialize a new build stage and set the base image. Every valid Dockerfile must begin with a FROM instruction (except ARG before FROM). Supports multi-stage builds via multiple FROM instructions. The optional AS keyword names the stage for COPY --from references.",
6
+ "description": "Initialize a new build stage and set the base image. Every Dockerfile must begin with a FROM instruction (ARG is allowed before FROM). Multiple FROM instructions create multi-stage builds.",
7
7
  "type": "instruction",
8
8
  "module": "Dockerfile"
9
9
  },
10
10
  "RUN": {
11
- "signature": "RUN [--mount=<type>] [--network=<type>] [--security=<type>] <command> | RUN [\"executable\", \"param1\", \"param2\"]",
12
- "description": "Execute a command in a new layer on top of the current image and commit the result. Shell form runs via /bin/sh -c (or SHELL override). Exec form (JSON array) runs directly without shell processing. Supports BuildKit mount types: cache, bind, secret, ssh, tmpfs. Each RUN creates a new image layer — combine related commands with && to reduce layers.",
11
+ "signature": "RUN [--mount=<opts>] [--network=<type>] [--security=<type>] <command> | RUN [\"executable\", \"arg1\", ...]",
12
+ "description": "Execute a command in a new layer on top of the current image. Shell form runs via /bin/sh -c; exec form runs directly. Each RUN creates a new layer.",
13
13
  "type": "instruction",
14
14
  "module": "Dockerfile"
15
15
  },
16
16
  "CMD": {
17
- "signature": "CMD [\"executable\", \"param1\", \"param2\"] | CMD [\"param1\", \"param2\"] | CMD command param1 param2",
18
- "description": "Set the default command to execute when a container starts. Only the last CMD in a Dockerfile takes effect. Three forms: exec form (preferred, JSON array), as default parameters to ENTRYPOINT (JSON array), and shell form. CMD is overridden by arguments passed to docker run.",
17
+ "signature": "CMD [\"executable\",\"param1\",\"param2\"] | CMD [\"param1\",\"param2\"] | CMD command param1",
18
+ "description": "Provide defaults for an executing container. Only the last CMD takes effect. Exec form is preferred. If used with ENTRYPOINT, provides default arguments.",
19
+ "type": "instruction",
20
+ "module": "Dockerfile"
21
+ },
22
+ "ENTRYPOINT": {
23
+ "signature": "ENTRYPOINT [\"executable\", \"param1\"] | ENTRYPOINT command param1",
24
+ "description": "Configure a container that will run as an executable. Exec form is preferred. CMD arguments are appended. Override with docker run --entrypoint.",
19
25
  "type": "instruction",
20
26
  "module": "Dockerfile"
21
27
  },
22
28
  "LABEL": {
23
29
  "signature": "LABEL <key>=<value> [<key>=<value> ...]",
24
- "description": "Add metadata to an image as key-value pairs. Labels are inherited from base images and can be inspected with docker inspect. Use OCI standard annotations (org.opencontainers.image.*) for interoperability. Combine multiple labels in one instruction to create a single layer.",
30
+ "description": "Add metadata to an image as key-value pairs. Use OCI annotation keys for standard metadata (org.opencontainers.image.*).",
25
31
  "type": "instruction",
26
32
  "module": "Dockerfile"
27
33
  },
28
34
  "MAINTAINER": {
29
35
  "signature": "MAINTAINER <name>",
30
- "description": "Set the Author field of the generated image. Deprecated in favor of LABEL: use LABEL maintainer=\"name <email>\" instead. Still parsed for backward compatibility but should not be used in new Dockerfiles.",
36
+ "description": "Set the Author field. Deprecated: use LABEL org.opencontainers.image.authors instead.",
31
37
  "type": "instruction",
32
38
  "module": "Dockerfile"
33
39
  },
34
40
  "EXPOSE": {
35
41
  "signature": "EXPOSE <port>[/<protocol>] [<port>[/<protocol>] ...]",
36
- "description": "Inform Docker that the container listens on the specified network port(s) at runtime. Default protocol is TCP; specify /udp for UDP. EXPOSE does not actually publish the port — it documents which ports are intended to be published. Use -p at docker run or ports in compose to actually publish.",
42
+ "description": "Document which ports the container listens on. Does not actually publish ports; use -p at runtime. Protocol defaults to TCP.",
37
43
  "type": "instruction",
38
44
  "module": "Dockerfile"
39
45
  },
40
46
  "ENV": {
41
47
  "signature": "ENV <key>=<value> [<key>=<value> ...]",
42
- "description": "Set environment variables that persist in the built image and running containers. ENV values are available during build (in subsequent instructions) and at runtime. Use ARG for build-only variables. ENV values can be overridden at runtime with docker run --env. Each ENV instruction creates a new layer; combine related variables in one instruction.",
48
+ "description": "Set environment variables that persist in the built image and running containers. Values can be overridden at runtime with docker run --env.",
43
49
  "type": "instruction",
44
50
  "module": "Dockerfile"
45
51
  },
46
52
  "ADD": {
47
- "signature": "ADD [--chown=<user>:<group>] [--chmod=<perms>] [--checksum=<hash>] <src> ... <dest>",
48
- "description": "Copy files, directories, or remote URLs from <src> to the filesystem of the image at <dest>. ADD has special features: automatic extraction of recognized archive formats (tar, gzip, bzip2, xz) and support for remote URLs. For plain file copies, COPY is preferred. --chown sets ownership (Linux only). --checksum validates remote URLs.",
53
+ "signature": "ADD [--chown=<user>:<group>] [--chmod=<perms>] [--checksum=<hash>] <src>... <dest>",
54
+ "description": "Copy files, directories, or remote URLs into the image. Unlike COPY, ADD supports URL sources and automatic tar extraction. Prefer COPY for simple file copying.",
49
55
  "type": "instruction",
50
56
  "module": "Dockerfile"
51
57
  },
52
58
  "COPY": {
53
- "signature": "COPY [--from=<name|index>] [--chown=<user>:<group>] [--chmod=<perms>] [--link] <src> ... <dest>",
54
- "description": "Copy files or directories from the build context (or a named build stage / external image with --from) into the image filesystem. Preferred over ADD for basic file copying. --chown sets ownership (Linux only). --link creates independent layers for better cache reuse. Paths are relative to the build context.",
55
- "type": "instruction",
56
- "module": "Dockerfile"
57
- },
58
- "ENTRYPOINT": {
59
- "signature": "ENTRYPOINT [\"executable\", \"param1\", \"param2\"] | ENTRYPOINT command param1 param2",
60
- "description": "Configure the container to run as an executable. Arguments from CMD or docker run are appended to the exec form ENTRYPOINT. Only the last ENTRYPOINT takes effect. Exec form (JSON array) is preferred. Shell form runs as /bin/sh -c subcommand, which does not pass signals. Use ENTRYPOINT for the main process and CMD for default arguments.",
59
+ "signature": "COPY [--from=<name>] [--chown=<user>:<group>] [--chmod=<perms>] [--link] <src>... <dest>",
60
+ "description": "Copy files or directories from the build context (or a previous stage with --from) into the image. Preferred over ADD for simple file operations.",
61
61
  "type": "instruction",
62
62
  "module": "Dockerfile"
63
63
  },
64
64
  "VOLUME": {
65
65
  "signature": "VOLUME [\"/path\"] | VOLUME /path1 /path2",
66
- "description": "Create a mount point with the specified path and mark it as holding externally mounted volumes from the host or other containers. Data in volumes persists beyond the container lifecycle. Changes to volumes after the VOLUME instruction are not preserved during build. Use named volumes or bind mounts at runtime for data persistence.",
66
+ "description": "Create a mount point and mark it for holding externally mounted volumes. Data in volumes persists independently of the container lifecycle.",
67
67
  "type": "instruction",
68
68
  "module": "Dockerfile"
69
69
  },
70
70
  "USER": {
71
71
  "signature": "USER <user>[:<group>] | USER <UID>[:<GID>]",
72
- "description": "Set the user name (or UID) and optionally the group (or GID) for RUN, CMD, and ENTRYPOINT instructions that follow in the Dockerfile. The user must exist in the image (create with useradd/adduser). Running containers as non-root is a security best practice. The user can be overridden at runtime with docker run --user.",
72
+ "description": "Set the user and optionally group for RUN, CMD, and ENTRYPOINT instructions that follow. Best practice: run as non-root user for security.",
73
73
  "type": "instruction",
74
74
  "module": "Dockerfile"
75
75
  },
76
76
  "WORKDIR": {
77
- "signature": "WORKDIR /path/to/workdir",
78
- "description": "Set the working directory for RUN, CMD, ENTRYPOINT, COPY, and ADD instructions that follow. If the directory does not exist, it is created. WORKDIR can be set multiple times and is resolved relative to the previous WORKDIR. Use absolute paths for clarity. Environment variables set with ENV can be used in the path.",
77
+ "signature": "WORKDIR /path/to/dir",
78
+ "description": "Set the working directory for subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions. Creates the directory if it does not exist. Can be used multiple times.",
79
79
  "type": "instruction",
80
80
  "module": "Dockerfile"
81
81
  },
82
82
  "ARG": {
83
83
  "signature": "ARG <name>[=<default value>]",
84
- "description": "Define a build-time variable that users can pass with docker build --build-arg <name>=<value>. ARG values are not persisted in the final image (unlike ENV). ARG before FROM is available only for the FROM instruction. ARG after FROM is scoped to the current build stage. Predefined ARGs include HTTP_PROXY, BUILDPLATFORM, TARGETPLATFORM, etc.",
84
+ "description": "Define a build-time variable. Values are supplied with --build-arg. ARGs before FROM are available only in FROM; ARGs after FROM are available in that build stage.",
85
85
  "type": "instruction",
86
86
  "module": "Dockerfile"
87
87
  },
88
88
  "ONBUILD": {
89
89
  "signature": "ONBUILD <INSTRUCTION>",
90
- "description": "Add a trigger instruction to the image metadata that executes when the image is used as a base for another build. The trigger fires immediately after the FROM instruction in the child Dockerfile. Useful for building generic base images. ONBUILD ONBUILD is not allowed. ONBUILD instructions are not inherited beyond one level.",
90
+ "description": "Register a trigger instruction to execute when the image is used as a FROM base for another Dockerfile. Useful for creating base images that auto-configure child images.",
91
91
  "type": "instruction",
92
92
  "module": "Dockerfile"
93
93
  },
94
94
  "STOPSIGNAL": {
95
95
  "signature": "STOPSIGNAL <signal>",
96
- "description": "Set the system call signal sent to the container to stop it. The signal can be a signal name (e.g., SIGTERM, SIGKILL, SIGQUIT) or an unsigned number matching a position in the kernel's syscall table (e.g., 9 for SIGKILL). Default is SIGTERM. Can be overridden at runtime with docker run --stop-signal.",
96
+ "description": "Set the system call signal sent to the container when docker stop is called. Can be a signal name (SIGTERM) or number (15). Default is SIGTERM.",
97
97
  "type": "instruction",
98
98
  "module": "Dockerfile"
99
99
  },
100
100
  "HEALTHCHECK": {
101
101
  "signature": "HEALTHCHECK [OPTIONS] CMD <command> | HEALTHCHECK NONE",
102
- "description": "Tell Docker how to test the container to check that it is still working. Options: --interval=DURATION (default 30s), --timeout=DURATION (default 30s), --start-period=DURATION (default 0s, grace period for startup), --retries=N (default 3). The command exit code determines health: 0=healthy, 1=unhealthy. Only the last HEALTHCHECK takes effect. Use HEALTHCHECK NONE to disable.",
102
+ "description": "Define a command to periodically check container health. Options: --interval, --timeout, --start-period, --start-interval, --retries. Use NONE to disable inherited checks.",
103
103
  "type": "instruction",
104
104
  "module": "Dockerfile"
105
105
  },
106
106
  "SHELL": {
107
107
  "signature": "SHELL [\"executable\", \"parameters\"]",
108
- "description": "Override the default shell used for the shell form of RUN, CMD, and ENTRYPOINT instructions. Default on Linux is [\"/bin/sh\", \"-c\"], on Windows is [\"cmd\", \"/S\", \"/C\"]. SHELL can appear multiple times and affects all subsequent shell-form instructions. Useful for switching to bash, powershell, or other shells.",
108
+ "description": "Override the default shell for shell-form commands. Default on Linux: [\"/bin/sh\", \"-c\"]. Default on Windows: [\"cmd\", \"/S\", \"/C\"]. Affects subsequent RUN, CMD, ENTRYPOINT shell forms.",
109
109
  "type": "instruction",
110
110
  "module": "Dockerfile"
111
+ },
112
+ "syntax": {
113
+ "signature": "# syntax=<frontend-image>",
114
+ "description": "Parser directive specifying the BuildKit frontend to use. Must be the very first line. Example: # syntax=docker/dockerfile:1",
115
+ "type": "parser-directive",
116
+ "module": "Dockerfile"
117
+ },
118
+ "escape": {
119
+ "signature": "# escape=<char>",
120
+ "description": "Parser directive to set the escape character. Default is backslash (\\\\). Use backtick (`) on Windows. Must appear before any instruction.",
121
+ "type": "parser-directive",
122
+ "module": "Dockerfile"
123
+ },
124
+ "--mount=type=cache": {
125
+ "signature": "--mount=type=cache,target=<path>[,id=<id>][,sharing=<shared|private|locked>][,from=<image>][,source=<path>][,mode=<mode>][,uid=<uid>][,gid=<gid>]",
126
+ "description": "Mount a persistent cache directory across builds. Ideal for package manager caches (apt, pip, npm). Survives between builds for faster installs.",
127
+ "type": "mount-type",
128
+ "module": "BuildKit"
129
+ },
130
+ "--mount=type=bind": {
131
+ "signature": "--mount=type=bind,target=<path>[,source=<path>][,from=<image|stage>][,rw]",
132
+ "description": "Bind mount a directory from the build context or another stage. Read-only by default. Does not persist in the image layer.",
133
+ "type": "mount-type",
134
+ "module": "BuildKit"
135
+ },
136
+ "--mount=type=secret": {
137
+ "signature": "--mount=type=secret,id=<id>[,target=<path>][,required=<bool>][,mode=<mode>][,uid=<uid>][,gid=<gid>]",
138
+ "description": "Mount a secret file during build without persisting in the final image. Pass with --secret id=mysecret,src=secret.txt. Ideal for API keys, tokens, SSH keys.",
139
+ "type": "mount-type",
140
+ "module": "BuildKit"
141
+ },
142
+ "--mount=type=ssh": {
143
+ "signature": "--mount=type=ssh[,id=<id>][,target=<path>][,required=<bool>][,mode=<mode>][,uid=<uid>][,gid=<gid>]",
144
+ "description": "Forward the SSH agent socket during build. Useful for cloning private repos. Use with docker build --ssh default.",
145
+ "type": "mount-type",
146
+ "module": "BuildKit"
147
+ },
148
+ "--mount=type=tmpfs": {
149
+ "signature": "--mount=type=tmpfs,target=<path>[,size=<bytes>]",
150
+ "description": "Mount a tmpfs (RAM-backed) filesystem. Useful for scratch space that should not be committed to the image layer.",
151
+ "type": "mount-type",
152
+ "module": "BuildKit"
153
+ },
154
+ "--link": {
155
+ "signature": "COPY --link | ADD --link",
156
+ "description": "Enable link mode for COPY/ADD. Files are added in an independent layer that does not depend on previous layers, improving cache reuse when base image changes.",
157
+ "type": "flag",
158
+ "module": "BuildKit"
159
+ },
160
+ "--checksum": {
161
+ "signature": "ADD --checksum=sha256:<hash>",
162
+ "description": "Verify the checksum of a remote file added with ADD. Ensures integrity of downloaded files. Only sha256 is supported.",
163
+ "type": "flag",
164
+ "module": "BuildKit"
165
+ },
166
+ "--chmod": {
167
+ "signature": "COPY --chmod=<perms> | ADD --chmod=<perms>",
168
+ "description": "Set file permissions on copied/added files. Octal notation (755, 644). Avoids an extra RUN chmod layer.",
169
+ "type": "flag",
170
+ "module": "BuildKit"
171
+ },
172
+ "--chown": {
173
+ "signature": "COPY --chown=<user>:<group> | ADD --chown=<user>:<group>",
174
+ "description": "Set ownership on copied/added files. Accepts user/group names or numeric UID/GID. Avoids an extra RUN chown layer.",
175
+ "type": "flag",
176
+ "module": "BuildKit"
177
+ },
178
+ "--network": {
179
+ "signature": "RUN --network=<type>",
180
+ "description": "Control the network environment for RUN. Types: default (normal networking), none (no network), host (host networking).",
181
+ "type": "flag",
182
+ "module": "BuildKit"
183
+ },
184
+ "--security": {
185
+ "signature": "RUN --security=<type>",
186
+ "description": "Run with modified security mode. Types: sandbox (default), insecure (elevated privileges). Insecure requires security.insecure entitlement.",
187
+ "type": "flag",
188
+ "module": "BuildKit"
189
+ },
190
+ "--platform": {
191
+ "signature": "FROM --platform=<platform>",
192
+ "description": "Set the target platform for the build stage. Values: linux/amd64, linux/arm64, linux/arm/v7, $BUILDPLATFORM, $TARGETPLATFORM.",
193
+ "type": "flag",
194
+ "module": "BuildKit"
195
+ },
196
+ "build stage": {
197
+ "signature": "FROM ... AS <name>",
198
+ "description": "A build stage is defined by each FROM instruction. Stages can be named with AS and referenced by COPY --from. Multi-stage builds allow copying artifacts between stages while keeping the final image small.",
199
+ "type": "concept",
200
+ "module": "Dockerfile"
201
+ },
202
+ "layer": {
203
+ "signature": "Each RUN, COPY, ADD creates a layer",
204
+ "description": "An image layer is a filesystem diff created by an instruction. Layers are cached and shared between images. Combining commands in a single RUN reduces layer count and image size.",
205
+ "type": "concept",
206
+ "module": "Dockerfile"
207
+ },
208
+ "build context": {
209
+ "signature": "docker build [OPTIONS] <path|URL>",
210
+ "description": "The set of files sent to the Docker daemon for the build. Controlled by the path argument and .dockerignore. Minimize context for faster builds.",
211
+ "type": "concept",
212
+ "module": "Dockerfile"
213
+ },
214
+ "build cache": {
215
+ "signature": "Layer caching mechanism",
216
+ "description": "Docker caches each layer and reuses it if the instruction and its inputs have not changed. Invalidation propagates to all subsequent layers. Order instructions from least to most frequently changing.",
217
+ "type": "concept",
218
+ "module": "Dockerfile"
219
+ },
220
+ "multi-stage build": {
221
+ "signature": "FROM ... AS stage1 / FROM ... COPY --from=stage1",
222
+ "description": "Use multiple FROM statements to create intermediate stages. Copy only needed artifacts into the final image. Dramatically reduces final image size by excluding build tools.",
223
+ "type": "concept",
224
+ "module": "Dockerfile"
225
+ },
226
+ "BUILDPLATFORM": {
227
+ "signature": "ARG BUILDPLATFORM",
228
+ "description": "The platform of the build node (e.g., linux/amd64). Available automatically in BuildKit builds.",
229
+ "type": "predefined-arg",
230
+ "module": "BuildKit"
231
+ },
232
+ "TARGETPLATFORM": {
233
+ "signature": "ARG TARGETPLATFORM",
234
+ "description": "The target platform specified with --platform (e.g., linux/arm64). Used for cross-compilation.",
235
+ "type": "predefined-arg",
236
+ "module": "BuildKit"
237
+ },
238
+ "TARGETOS": {
239
+ "signature": "ARG TARGETOS",
240
+ "description": "The OS component of TARGETPLATFORM (e.g., linux, windows).",
241
+ "type": "predefined-arg",
242
+ "module": "BuildKit"
243
+ },
244
+ "TARGETARCH": {
245
+ "signature": "ARG TARGETARCH",
246
+ "description": "The architecture component of TARGETPLATFORM (e.g., amd64, arm64, arm).",
247
+ "type": "predefined-arg",
248
+ "module": "BuildKit"
249
+ },
250
+ "TARGETVARIANT": {
251
+ "signature": "ARG TARGETVARIANT",
252
+ "description": "The variant component of TARGETPLATFORM (e.g., v7 for arm/v7).",
253
+ "type": "predefined-arg",
254
+ "module": "BuildKit"
255
+ },
256
+ "BUILDOS": {
257
+ "signature": "ARG BUILDOS",
258
+ "description": "The OS component of BUILDPLATFORM.",
259
+ "type": "predefined-arg",
260
+ "module": "BuildKit"
261
+ },
262
+ "BUILDARCH": {
263
+ "signature": "ARG BUILDARCH",
264
+ "description": "The architecture component of BUILDPLATFORM.",
265
+ "type": "predefined-arg",
266
+ "module": "BuildKit"
267
+ },
268
+ "BUILDVARIANT": {
269
+ "signature": "ARG BUILDVARIANT",
270
+ "description": "The variant component of BUILDPLATFORM.",
271
+ "type": "predefined-arg",
272
+ "module": "BuildKit"
273
+ },
274
+ "--parents": {
275
+ "signature": "COPY --parents <src> <dest>",
276
+ "description": "Preserve the parent directory structure of source files when copying. BuildKit feature.",
277
+ "type": "flag"
278
+ },
279
+ "--keep-git-dir": {
280
+ "signature": "ADD --keep-git-dir=true <git-url> <dest>",
281
+ "description": "When adding from a Git URL, keep the .git directory.",
282
+ "type": "flag"
283
+ },
284
+ ".dockerignore": {
285
+ "signature": ".dockerignore file",
286
+ "description": "File listing patterns to exclude from the build context. Reduces context size and prevents sensitive files from being sent to the Docker daemon.",
287
+ "type": "concept"
288
+ },
289
+ "heredoc": {
290
+ "signature": "<<EOF ... EOF",
291
+ "description": "Heredoc syntax allows inline multi-line content in RUN and COPY instructions. Requires BuildKit (syntax >= docker/dockerfile:1.4).",
292
+ "type": "concept"
111
293
  }
112
294
  }
113
- }
295
+ }