Public | Automated Build

Last pushed: a month ago
Short Description
Node development image based on alpine-node
Full Description

chrisgarrett/node-dev

  • Node development image

Node image for rapid client/server development. This image is NOT meant for production!

Versions / packages

  • chrisgarrett/node:8.2.1 -> (node:8.2.1-alpine)
  • cross-env
  • feathers-cli
  • sequelize-cli

Usage

Standalone app:

Assumes that app is the directory that contains your package.json.

docker run --rm \
      -v `pwd`/examples/links/app:/work/app \
      chrisgarrett/node-dev:8.2.1 \
      npm start

App + libraries

When the container loads any folders mouned in /work/libs will automatically
be linked npm link to your app. Again, this assumes that each subfolder
contains a package.json file. For an example see examples/links.

  1. Start your library project first

    docker run --rm \
       -v `pwd`/examples/links/libs/mylib1:/work/app \
       chrisgarrett/node-dev:8.2.1 \
       npm start
    
  2. Next start your application mounting your library project

    docker run --rm \
       -v `pwd`/examples/links/app:/work/app \
       -v `pwd`/examples/links/libs/mylib1:/work/libs/mylib1 \
       chrisgarrett/node-dev:8.2.1 \
       npm start
    

Docker Compose

Here is an example compose file:

version: '2'
services:

  app:
    container_name: links_app
    image: chrisgarrett/node-dev:6.9.1
    command: npm start
    ports:
    - 3000:3000
    volumes:
    - ./examples/links/app:/work/app
    - ./examples/links/libs/mylib1:/work/libs/mylib1
    depends_on:
    - mylib1

  mylib1:
    container_name: links_lib1
    image: chrisgarrett/node-dev:6.9.1
    command: npm start
    volumes:
    - ./examples/links/libs/mylib1:/work/app

Run with:

docker-compose -p links up

Credits

Docker Pull Command
Owner
chrisgarrett
Source Repository

Comments (0)