Registry / devops / adocker-mysql

adocker-mysql

JSON →
library4.0.4jsnpmunverified

A lightweight utility for managing MySQL Docker containers via Node.js. Current stable version is 4.0.4, released with low frequency. It simplifies common Docker operations like running, starting, stopping, removing, and viewing logs for MySQL containers. Key differentiator is its simple API and error handling via callback. Requires Docker installed and the 'docker' command available in PATH.

npm install adocker-mysql
INSTALL
IMPORT
SIG · ADOCKER-MYSQL
A
adocker-mysql
devopsjavascriptv4.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

adockerMysql
const adockerMysql = require('adocker-mysql')
import adockerMysql from 'adocker-mysql'
This package does not ship ESM; use CommonJS require().

Shows how to create a MySQL container manager and run start/stop/remove lifecycle commands.

const adockerMysql = require('adocker-mysql'); const mysql = adockerMysql('my-container', { onError: (err) => { console.error(err); process.exit(1); } }); const {run, start, stop, remove, logs} = mysql.cli(); (async () => { await run(); console.log('Container started'); await stop(); console.log('Container stopped'); await remove({force: true}); console.log('Container removed'); })().catch(err => console.error(err));
Debug
Known issues
gotchaDocker must be installed and the 'docker' command must be available in PATH.
fix
Install Docker and ensure 'docker' is in your system PATH.
affects: all
gotchaThe onError callback is called for errors during operation execution.
fix
Provide an onError callback to handle errors gracefully, or wrap calls in try-catch.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'adocker-mysql'
Package not installed.
fix
npm install adocker-mysql --save
docker: command not found
Docker is not installed or not in PATH.
fix
Install Docker and add it to your PATH.
Upgrade
Version history
4.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
47 hits · last 30 days
node
40
OpenAI (training)
1
Resources
adocker-mysql — npm install adocker-mysql · libregistry