From f6d0e78500b706ae7b832c71df05bdf982929f4c Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Fri, 17 Jul 2020 16:21:18 +0900 Subject: [PATCH] chore: add docker-compose.yml --- Makefile | 3 +-- docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml diff --git a/Makefile b/Makefile index 6df25cc..d97a652 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,13 @@ cmd := "bash" msg := "" IMAGE_NAME := actions_hugo_dev:latest 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_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME) .PHONY: build build: - $(DOCKER_BUILD) + docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION) .PHONY: run run: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d6cbbf9 --- /dev/null +++ b/docker-compose.yml @@ -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