-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from docksal/develop
Release 2.3.0
- Loading branch information
Showing
35 changed files
with
1,276 additions
and
689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,56 @@ | ||
-include ../tests/env_make | ||
-include env_make | ||
|
||
PHP_VERSION = 5.6 | ||
VERSION ?= php-fpm-$(PHP_VERSION) | ||
|
||
VERSION ?= 5.6 | ||
REPO = docksal/cli | ||
NAME = docksal-cli-$(PHP_VERSION) | ||
TAG = build-$(VERSION) | ||
NAME = docksal-cli-$(VERSION) | ||
CWD = $(shell pwd) | ||
|
||
# Improve write performance for /home/docker by turning it into a volume | ||
VOLUMES += -v /home/docker | ||
|
||
.PHONY: build test push shell run start stop logs clean release | ||
|
||
build: | ||
docker build -t $(REPO):$(VERSION) . | ||
docker build -t $(REPO):$(TAG) . | ||
|
||
test: | ||
IMAGE=$(REPO):$(VERSION) NAME=$(NAME) PHP_VERSION=$(PHP_VERSION) ../tests/test.bats | ||
IMAGE=$(REPO):$(TAG) NAME=$(NAME) VERSION=$(VERSION) ../tests/test.bats | ||
|
||
push: | ||
docker push $(REPO):$(VERSION) | ||
|
||
shell: | ||
docker run --rm --name $(NAME) -it $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) /bin/bash | ||
docker push $(REPO):$(TAG) | ||
|
||
run: | ||
docker run --rm --name $(NAME) -it $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) | ||
run: clean | ||
docker run --rm --name $(NAME) -it $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG) | ||
|
||
start: | ||
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) | ||
start: clean | ||
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG) | ||
|
||
# Non-interactive and non-tty docker exec (uses LF instead of CRLF line endings) | ||
exec: | ||
docker exec -it $(NAME) /bin/bash | ||
@docker exec -u docker $(NAME) bash -lc "$(CMD)" | ||
|
||
# Interactive docker exec | ||
exec-it: | ||
@docker exec -u docker -it $(NAME) bash -ilc "$(CMD)" | ||
|
||
shell: | ||
@docker exec -u docker -it $(NAME) bash -il | ||
|
||
stop: | ||
docker stop $(NAME) | ||
|
||
logs: | ||
docker logs $(NAME) | ||
|
||
logs-follow: | ||
docker logs -f $(NAME) | ||
|
||
clean: | ||
docker rm -f $(NAME) | ||
docker rm -vf $(NAME) >/dev/null 2>&1 || true | ||
|
||
release: build | ||
make push -e VERSION=$(VERSION) | ||
make push -e TAG=$(TAG) | ||
|
||
default: build |
Oops, something went wrong.