Skip to content

Instantly share code, notes, and snippets.

@ryanashcraft
Last active August 4, 2017 16:07
Show Gist options
  • Select an option

  • Save ryanashcraft/7f29f2d6a2ad9d5ad43c27f7f4f6f7be to your computer and use it in GitHub Desktop.

Select an option

Save ryanashcraft/7f29f2d6a2ad9d5ad43c27f7f4f6f7be to your computer and use it in GitHub Desktop.
Ghost on Docker Makefile
DOCKER_IMAGE ?= ryanashcraft/ghost:1.0
DOCKER_CONTAINER ?= ghost
dev:
docker build -f Dockerfile.dev -t $(DOCKER_IMAGE) .
docker rm $(DOCKER_CONTAINER) && docker run \
-p 2368:2368 \
-v ${PWD}/content/data:/var/www/ghost/content/data \
-v ${PWD}/content/images:/var/www/ghost/content/images \
--name $(DOCKER_CONTAINER) \
-ti $(DOCKER_IMAGE)
update:
docker build --no-cache -f Dockerfile.dev -t $(DOCKER_IMAGE) .
docker run \
-v ${PWD}/content/data:/var/www/ghost/content/data \
-ti $(DOCKER_IMAGE)
ghost update
deploy:
now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment