1.1.1 • Published 8 months ago

@monolayer/dw v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Dockerfile Writer

Write Dockerfiles in TypeScript.

Docs are here.

Installation

npm install @monolayer/dw

Writing Dockerfiles

import { Dockerfile } from "@monolayer/dw";

const df = new Dockerfile();

df.banner("App image");

df.FROM("node:20-alpine", { as: "runner" })

df.comment(
  "Add libc6-compat package (required for use of process.dlopen)",
);
df.RUN("apk add --no-cache gcompat=1.1.0-r4");

df.WORKDIR("/app");

df.group(() => {
  df.COPY("index.js, "./")
  df.COPY("index.js.map, "./")
});

df.ENV("NODE_ENV", "production");

df.CMD(["index.js"]);

df.blank()

df.ENTRYPOINT("node");

df.save("./app.Dockerfile");
1.1.1

8 months ago

1.1.0

10 months ago

1.0.0

11 months ago