Skip to content

Instantly share code, notes, and snippets.

@voledemar
Last active October 29, 2019 12:06
Show Gist options
  • Save voledemar/57ea65fcace984352ccf5359380f38f4 to your computer and use it in GitHub Desktop.
Save voledemar/57ea65fcace984352ccf5359380f38f4 to your computer and use it in GitHub Desktop.
IMAGE_REPO = registry.gitlab.com
GROUP_NAME =
PROJECT_NAME =
DOCKERFILE = Dockerfile
CONTEXT = ..
# tag = $(shell cat $(CONTEXT)/version.txt)
IMAGE = $(IMAGE_REPO)/$(GROUP_NAME)/$(PROJECT_NAME):$(tag)
all: build
build:
@docker build -f $(DOCKERFILE) -t $(IMAGE) $(CONTEXT)
rebuild:
@docker build --no-cache -f $(DOCKERFILE) -t $(IMAGE) $(CONTEXT)
pull:
@docker pull $(IMAGE)
push:
@docker push $(IMAGE)
login:
@docker login $(IMAGE_REPO)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment