docker.mk: dont change context persistently
This commit is contained in:
parent
91999ec9b5
commit
53ef6d3032
18
docker.mk
18
docker.mk
|
@ -26,8 +26,7 @@ post-deploy-docker:
|
|||
pull-compose:
|
||||
@- echo "\n### pulling image(s)"
|
||||
@- $(foreach ctx,$(DEPLOY_HOSTS), \
|
||||
docker context use $(ctx); \
|
||||
docker pull $(DOCKER_IMAGE); \
|
||||
docker --context $(ctx) pull $(DOCKER_IMAGE); \
|
||||
)
|
||||
|
||||
pull-swarm:
|
||||
|
@ -35,8 +34,7 @@ pull-swarm:
|
|||
start-compose:
|
||||
@- echo "\n### starting service(s)"
|
||||
@- $(foreach ctx,$(DEPLOY_HOSTS), \
|
||||
docker context use $(ctx); \
|
||||
docker-compose up -d; \
|
||||
docker-compose --host $(ctx) up -d; \
|
||||
)
|
||||
|
||||
start-swarm:
|
||||
|
@ -48,8 +46,7 @@ start-swarm:
|
|||
stop-compose:
|
||||
@- echo "\n### stopping service(s)"
|
||||
@- $(foreach ctx,$(DEPLOY_HOSTS), \
|
||||
docker context use $(ctx); \
|
||||
docker-compose down; \
|
||||
docker-compose --host $(ctx) down; \
|
||||
)
|
||||
|
||||
stop-swarm:
|
||||
|
@ -60,18 +57,15 @@ stop-swarm:
|
|||
|
||||
logs-compose:
|
||||
@- echo "\n### logs"
|
||||
@- docker context use $(host)
|
||||
@- docker-compose logs -f $(service)
|
||||
@- docker-compose --host $(ctx) logs -f $(service)
|
||||
|
||||
logs-swarm:
|
||||
@- echo "\n### logs"
|
||||
@- docker context use $(DEPLOY_HOSTS)
|
||||
@- docker service logs -f $(service)
|
||||
@- docker --context $(ctx) service logs -f $(service)
|
||||
|
||||
restart-compose:
|
||||
@- $(foreach ctx,$(DEPLOY_HOSTS), \
|
||||
docker context use $(ctx); \
|
||||
docker-compose restart; \
|
||||
docker-compose --host $(ctx) restart; \
|
||||
)
|
||||
|
||||
reload-compose:
|
||||
|
|
Loading…
Reference in New Issue