Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including devdock with all npm packages installed. Try it out:

var devdock = require("devdock")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

devdock v0.3.0

Prototype utility that provides Dev environments built on top of Docker App


Docs and an example are coming soon!

This project is a prototype that builds on top of Docker App (yet another experimental tool) to make it easy to spin up local dev environments. The use case lies in applications that are composed of many services (backend, multiple frontends, etc.) and developing in one service needs the other components running.

Long term, it's likely this will be moved from Node to something like Go to prevent the need of having a Node runtime. But, since I'm more familiar with Node, decided to start there to flush out the idea.


npm install -g devdock

Docker App Configuration

In order to work, the Docker App you wish to use must have additional service metadata to indicate the service can be disabled and the name to be used in the interactive menus.

  • x-enabled - used by Docker App to actually disable and remove the service when being rendered
  • x-devdock-description - a human friendly name to be used in the interactive menus
  • x-devdock-setting-name - the name of the setting that must be false in order to disable the service

Example Docker App Compose File (truncated)

version: "3.7"
    image: sample-api-image
    x-enabled: ${enable-api}
    x-devdock-description: API/Backend
    x-devdock-setting-name: enable-api
    image: sample-frontend-image
    x-enabled: ${enable-frontend}
    x-devdock-description: Browser Frontend
    x-devdock-setting-name: enable-frontend


To use the terminal menu to disable/enable services, simply run (notice no additional arguments):

devdock voting-app mikesir87/votingapp.dockerapp:0.1.0

In addition, all Docker Compose commands are specified when added to the end. For example:

devdock voting-app mikesir87/votingapp.dockerapp:0.1.0 ps

Image Variable Support

On our team, we make use of feature branches. Each feature branch has its own deployed Docker App. If the image contains {BRANCH}, the value will be replaced with the name of the current checked out branch. If no branch is detected, it falls back to master.


# Imagine in a git repo on branch 3-test-something
devdock sample mikesir87/votingapp.dockerapp:{BRANCH} config
# This will end up pulling mikesir87/votingapp.dockerapp:3-test-something

Using Aliases

To make things simple, you can make aliases to wrap the command and provide a simple project-specific "cli tool". For example, if I were working on the Docker Voting App, I could simply add this to my ~/.bash_profile:

alias voting-app="devdock voting-app mikesir87/votingapp.dockerapp:0.1.0 $@"

Then, I can use any docker-compose command, but scoped to the project! So much easier for new developers on the team!

voting-app up -d
voting-app ps
voting-app down


The mikesir87/devdock-demo repo contains a wrapped version of the Docker Voting App Example. The compose file has the additional metadata and can be used to test things out. So... give it a try!


There are a few things I'd like to see, as we already have use cases for them. Here are a few items...

  • When Docker App PR #418 is merged, we can drop the need for x-devdock-setting-name
  • Clean up code so it's not in one mega-file (still just a prototype right now)


This project is licensed using the MIT license. See LICENSE

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free