Skip to content

djskinner/docker-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-deploy

npm script to build, tag and push a Docker image.

Use this script to build and tag an image based on the version in your project's package.json then push it to the registry.

Prerequisites

  • Docker must be installed on the machine you are running docker-deploy on
  • You have already configured access to the docker registry to be pushing to (by using docker login)

Install

npm i docker-deploy --save-dev

Setup

Add a config.docker entry in your package.json and simply specify the name of your docker image. For example:

  "config": {
    "docker": {
      "imageName": "YOUR_DOCKERHUB_NAME/image-name"
    }
  },

Add docker-deploy as an npm script in your package.json

  "scripts": {
    "deploy": "docker-deploy",
  }

Usage

Assumes you have a Dockerfile in the project root.

When you are ready to build and push a new image, for example after using commit-release, simply run:

npm run deploy

About

npm script to build, tag and push a Docker image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published