Compare commits

...

1 commit

Author SHA1 Message Date
peaceiris
f6d0e78500
chore: add docker-compose.yml 2020-07-17 16:21:18 +09:00
2 changed files with 17 additions and 2 deletions

View file

@ -2,14 +2,13 @@ cmd := "bash"
msg := "" msg := ""
IMAGE_NAME := actions_hugo_dev:latest IMAGE_NAME := actions_hugo_dev:latest
NODE_VERSION := $(shell cat ./.nvmrc) NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME) DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME) DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)
.PHONY: build .PHONY: build
build: build:
$(DOCKER_BUILD) docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
.PHONY: run .PHONY: run
run: run:

16
docker-compose.yml Normal file
View file

@ -0,0 +1,16 @@
version: '3.2'
services:
dev:
image: 'docker.pkg.github.com/peaceiris/actions-hugo/dev:latest'
build:
context: .
# cache_from:
# - 'docker.pkg.github.com/peaceiris/actions-hugo/dev:latest'
container_name: peaceiris_actions_hugo_dev_latest
volumes:
- ${PWD}:/repo
stdin_open: true
tty: true
command:
- bash