Last active
February 23, 2017 08:29
-
-
Save rdallasgray/e0fd083ce37638278b13f0542097891f to your computer and use it in GitHub Desktop.
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
SSH_DIR=${shell cd ~/.ssh; pwd} | |
IMAGE_NAME=my_image | |
IMAGE_VERSION=0.0.1 | |
IMAGE_TAG=${IMAGE_NAME}:${IMAGE_VERSION} | |
CONTAINER_NAME=${IMAGE_NAME}-${IMAGE_VERSION} | |
build: | |
@docker build \ | |
--tag "${IMAGE_TAG}" \ | |
.; | |
create: | |
@docker create \ | |
--name="${CONTAINER_NAME}" \ | |
--interactive \ | |
--tty \ | |
--publish-all \ | |
--volume "bundle:/myproject/vendor" \ | |
--volume "${SSH_DIR}:/root/.ssh" \ | |
"${IMAGE_TAG}"; \ | |
fi; | |
start: create | |
@docker start ${CONTAINER_NAME}; | |
sh: start | |
docker exec -it ${CONTAINER_NAME} /bin/bash | |
.PHONY: build create start sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment