diff --git a/Makefile b/Makefile deleted file mode 100644 index 6fb3dc2d..00000000 --- a/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -IMAGE=terracotta -VERSION=<> - -all: build push - -build: - docker build -f ./docker/Dockerfile -t $(IMAGE):$(VERSION) . - -push: - docker push $(IMAGE):$(VERSION) - -.PHONY: build push all diff --git a/.dockerignore b/docker/.dockerignore similarity index 100% rename from .dockerignore rename to docker/.dockerignore diff --git a/docker/Makefile b/docker/Makefile new file mode 100644 index 00000000..e3818cf5 --- /dev/null +++ b/docker/Makefile @@ -0,0 +1,13 @@ +REGISTRY=docker.io +IMAGE=terracotta +TAG=latest + +all: build push + +build: + docker build -f Dockerfile -t $(REGISTRY)/$(IMAGE):$(TAG) .. + +push: + docker push $(REGISTRY)/$(IMAGE):$(TAG) + +.PHONY: build push all diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 00000000..841abad0 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,22 @@ +# Terracotta docker + +This directory contains the docker files to build the Terracotta docker image. + +## Build the image +**Make sure the current directory is in docker/** + +Build using the default image name and tag: +```bash +make build +``` + +Build using a custom registry, image name and tag: +```bash +make build REGISTRY=myregistry.com IMAGE=terracotta TAG=test +``` + +## Push the image +**Make sure the current directory is in docker/** +```bash +make push +```