Skip to content

Commit

Permalink
Remove tools dev-shell make target (istio#17354)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlenglet authored and istio-testing committed Sep 24, 2019
1 parent 5ede6f1 commit 6bade81
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions tools/istio-docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -344,40 +344,3 @@ docker.basedebug_deb:
# Job run from the nightly cron to publish an up-to-date xenial with the debug tools.
docker.push.basedebug: docker.basedebug
docker push istionightly/base_debug:latest

# Build a dev environment Docker image.
DEV_IMAGE_NAME = istio/dev:$(USER)
DEV_CONTAINER_NAME = istio-dev
DEV_GO_VERSION = 1.12.5
tools/docker-dev/image-built: tools/docker-dev/Dockerfile
@echo "building \"$(DEV_IMAGE_NAME)\" Docker image"
@docker build \
--build-arg goversion="$(DEV_GO_VERSION)" \
--build-arg user="${shell id -un}" \
--build-arg group="${shell id -gn}" \
--build-arg uid="${shell id -u}" \
--build-arg gid="${shell id -g}" \
--tag "$(DEV_IMAGE_NAME)" - < tools/docker-dev/Dockerfile
@touch $@

# Start a dev environment Docker container.
.PHONY = dev-shell clean-dev-shell
dev-shell: tools/docker-dev/image-built
@if test -z "$(shell docker ps -a -q -f name=$(DEV_CONTAINER_NAME))"; then \
echo "starting \"$(DEV_CONTAINER_NAME)\" Docker container"; \
docker run --detach \
--name "$(DEV_CONTAINER_NAME)" \
--volume "$(GOPATH):/home/$(USER)/go:consistent" \
--volume "$(HOME)/.config/gcloud:/home/$(USER)/.config/gcloud:cached" \
--volume "$(HOME)/.kube:/home/$(USER)/.kube:cached" \
--volume /var/run/docker.sock:/var/run/docker.sock \
"$(DEV_IMAGE_NAME)" \
'while true; do sleep 60; done'; fi
@echo "executing shell in \"$(DEV_CONTAINER_NAME)\" Docker container"
@docker exec --tty --interactive "$(DEV_CONTAINER_NAME)" /bin/bash

clean-dev-shell:
docker rm -f "$(DEV_CONTAINER_NAME)" || true
if test -n "$(shell docker images -q $(DEV_IMAGE_NAME))"; then \
docker rmi -f "$(shell docker images -q $(DEV_IMAGE_NAME))" || true; fi
rm -f tools/docker-dev/image-built

0 comments on commit 6bade81

Please sign in to comment.