Skip to content

Instantly share code, notes, and snippets.

@waleedsamy
Last active June 6, 2017 16:43
Show Gist options
  • Save waleedsamy/edeadcbf2d373a75da465dbc72fa7a1b to your computer and use it in GitHub Desktop.
Save waleedsamy/edeadcbf2d373a75da465dbc72fa7a1b to your computer and use it in GitHub Desktop.
build docker image with same version as docker container, based on [this](https://gist.github.com/DarrenN/8c6a5b969481725a4413)
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
docker build -t apps/app:latest -t apps/app:v$PACKAGE_VERSION .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment