mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
docker: use nodejs 6.10.0
- Pull Node version from .nvmrc - Migrate passwords out of .travis.yml
This commit is contained in:
@@ -50,10 +50,14 @@ travis:
|
||||
docker_release:
|
||||
# Get the version from the package.json file
|
||||
$(eval DOCKER_TAG=$(shell cat package.json | jq '.version' | tr -d '"'))
|
||||
$(eval NODE_VERSION=$(shell cat .nvmrc))
|
||||
#
|
||||
# Create a Dockerfile that contains the correct NodeJS version
|
||||
cat Dockerfile.example | sed -e "s/^FROM node:.*/FROM node:${NODE_VERSION}/" > Dockerfile
|
||||
#
|
||||
# Rebuild the image. We do this with no-cache so that we have all security upgrades,
|
||||
# since that's more important than fewer layers in the Docker image.
|
||||
docker build --no-cache=true -f Dockerfile.example -t $(DOCKER_IMAGE):$(DOCKER_TAG) .
|
||||
docker build --no-cache=true -t $(DOCKER_IMAGE):$(DOCKER_TAG) .
|
||||
# Push an image to Docker Hub with the version from package.json:
|
||||
docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
|
||||
#
|
||||
@@ -68,5 +72,6 @@ docker_release:
|
||||
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest_dev && \
|
||||
docker push $(DOCKER_IMAGE):latest_dev; \
|
||||
fi
|
||||
rm -f Dockerfile
|
||||
|
||||
.PHONY: all coverage docker_release report test travis
|
||||
|
||||
Reference in New Issue
Block a user