var Dockerfile =require("dockerfilejs").Dockerfile;
var file =newDockerfile();
file.comment('The above code example yields this file!')
.env({DEBUG:'express:* node index.js'})
.expose(8080)
.separator('\n')
.from({ image :'node', tag :'latest'})
.comment('FROM gets bumped under initial comments')
.render();
# The above code example yields this file!FROM node:latest
ENV DEBUG="express:* node index.js"EXPOSE 8080
# FROM gets bumped under initial comments
file.from({ image:'node', tag:'10-alpine', name:'build' })
// FROM node:10-alpine AS build// ... run your build commands here ...file.stage()
// Adds a new stagefile.from({ image:'node', registry:'docker.io', tag:'10-alpine' })
// Sets the `FROM` instruction in the new stage, etc ...file.copy({ from:'build', src: ['./lib'], dest:'./lib' })
// COPY --from=build ["./lib", "./lib"]
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.