From dfd4f6f5de468c1441f626a2faac7c74b9433954 Mon Sep 17 00:00:00 2001 From: FabrizioCafolla Date: Mon, 12 Sep 2022 23:02:39 +0200 Subject: [PATCH] feat: add image_run command --- Makefile | 5 +++-- Readme.md | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 42ca062..b1b04aa 100755 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ TAG = "latest" image_build: ## build immagine @docker build --tag "$(IMAGENAME):$(TAG)" \ --no-cache \ - --target="pro" \ + --target=$(ENV) \ --build-arg ENV=$(ENV) \ --build-arg APPNAME=$(APPNAME) \ --build-arg DOMAIN=$(DOMAIN) \ @@ -40,7 +40,8 @@ image_build: ## build immagine image_push: ## publish image @docker push "$(IMAGENAME):$(TAG)" - +image_run: + @docker run -d --rm -p 80:80 -p 9000:9000 --name $(APPNAME) $(IMAGENAME):$(TAG) ## ENV: DEV ifeq ($(ENV),develop) diff --git a/Readme.md b/Readme.md index fcfa056..ff06631 100755 --- a/Readme.md +++ b/Readme.md @@ -51,11 +51,11 @@ The first time the setup is run some data will be asked as input (app name, larv deploy: rebuild containers (down, build and up) - ## production ## - image_build: build immagine image_push: publish image + + image_push: run image [Manual push](https://docs.docker.com/engine/reference/commandline/push/) into docker hub registry