From ad17bf0e327f7e983333c65012d1f99e5b256bfe Mon Sep 17 00:00:00 2001 From: Shunsuke Michii Date: Mon, 1 Aug 2016 19:29:13 +0900 Subject: [PATCH] Add docker tasks. --- Dockerfile | 1 - Makefile | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8d74bc..38e9325 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ FROM alpine:3.4 RUN apk add --no-cache g++ make go - RUN mkdir -p /tmp/go-lbiwebp COPY Makefile /tmp/go-libwebp/Makefile diff --git a/Makefile b/Makefile index 697cb72..5d3dd1b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ BUILDDIR=/tmp WORKDIR=github.com/harukasan/go-libwebp +CURDIR=$(shell pwd) all: test @@ -17,7 +18,20 @@ libwebp: && make install \ ) +docker-test: + docker run -v ${CURDIR}:/go/src/github.com/harukasan/go-libwebp -it go-libwebp + +docker-sh: + docker run -v ${CURDIR}:/go/src/github.com/harukasan/go-libwebp -it go-libwebp sh + +docker-build: + docker build -t go-libwebp . + + .PHONY: \ all \ - test + test \ + docker-test \ + docker-sh \ + docker-build