Skip to content

Commit

Permalink
feat: add image_run command
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioCafolla committed Sep 12, 2022
1 parent e8b781d commit dfd4f6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfd4f6f

Please sign in to comment.