See the Atomist documentation for more information on what SDMs are and what they can do for you using the Atomist API for software.
Docker Image Creation
Dockerfile Parsing and Manipulation
This module includes support for parsing Docker files, within the Atomist tree path model. This allows us to query instructions in Docker files and update them without otherwise changing file content or formatting.
The following example returns the image name:
The following example uses
DockerFileParser exported by this package, to update
an image tag of
xenon to produce a file referencing
await astUtils.doWithAllMatchesp, DockerFileParser, "Dockerfile","//FROM/image/tag",n.$value = "xenon";
This example uses a custom function to find all
RUN instructions that invoke
We introduce the
pair level to handle
LABELs. For example, consider
the following input:
LABEL "com.example.vendor"="ACME Incorporated"
The following code queries it:
;assert.strictEquallabelKeys, `com.example.vendor`;;assert.strictEquallabelValues, `ACME Incorporated`;;assert.strictEqualknownKeys, `ACME Incorporated`;
dockerFileParser.test.ts for further examples.
General support questions should be discussed in the
channel in the Atomist community Slack workspace.
If you find a problem, please create an issue.
You will need to install Node to build and test this project.
Build and test
Use the following package scripts to build, test, and perform other development tasks.
||install project dependencies|
||compile, test, lint, and generate docs|
||run TSLint against the TypeScript|
||generate types from GraphQL and compile TypeScript|
||run tests every time a file changes|
||remove files generated during build|
Releases are handled via the Atomist SDM. Just press the 'Approve' button in the Atomist dashboard or Slack.