Skip to content

Commit

Permalink
fixed docker push without a tag pushed all images on the machine to d…
Browse files Browse the repository at this point in the history
…ocker hub
  • Loading branch information
groundnuty committed Apr 15, 2020
1 parent 0e01916 commit 808b158
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ all: push
container: image

image:
docker build -t $(PREFIX)/$(REPO_NAME) . # Build new image and automatically tag it as latest
docker build -t $(PREFIX)/$(REPO_NAME):latest . # Build new image and automatically tag it as latest
docker tag $(PREFIX)/$(REPO_NAME) $(PREFIX)/$(REPO_NAME):$(TAG) # Add the version tag to the latest image

push: image
docker push $(PREFIX)/$(REPO_NAME) # Push image tagged as latest to repository
docker push $(PREFIX)/$(REPO_NAME):latest # Push image tagged as latest to repository
docker push $(PREFIX)/$(REPO_NAME):$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)

clean:

0 comments on commit 808b158

Please sign in to comment.