
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
dockerconfig
Advanced tools
//somewhere in your init script/class
const dockerconfig = require("dockerconfig");
//myConfigData = { port: 1234, nested: { something: "no" } };
const myConfigData = require("./config.json");
const config = dockerconfig.getConfig(myConfigData);
config.makeGlobal();
//somewhere else
console.log(CONFIG.port);
console.log(CONFIG.nested.something);
//your dockerfile
FROM node:6-onbuild
# building & run docker image
# with environment variables to overwrite config data
docker build -t my-config-test .
docker run -e NODE_CONFIG_PORT=5555 -e NODE_CONFIG_NESTED_SOMETHING=yes my-config-test
# outputs:
# 555 instead of 1234
# "yes" instead of "no"
Versioning helps you to keep application-image and deployment-configuration (via environment-variables) in sync, since it's not always possible to keep all config-changes backwards-compatible or provide sane defaults.
In your application/image add a key configVersion to your config.json (or rather: config-object). The configVersion must be a number, using timestamps is recommended:
{
"configVersion": 1464091200
}
Next add the environment variable NODE_CONFIG_CONFIGVERSION with the very same value when running your container:
$ docker run -e NODE_CONFIG_CONFIGVERSION=1464091200 my-application
Now dockerconfig.getConfig()
will throw an exception on version-mismatch.
FAQs
easy nodejs config for docker (overwrite with ENV vars)
The npm package dockerconfig receives a total of 9 weekly downloads. As such, dockerconfig popularity was classified as not popular.
We found that dockerconfig demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.