From 0a1ba3e148da5dc970af1542e4334ad0c635857b Mon Sep 17 00:00:00 2001 From: Michael Strüder Date: Sat, 29 Apr 2017 15:21:08 +0200 Subject: base Dockerfile on official golang:alpine image This frees us from having to deal with build issues like #56. --- Dockerfile | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf5fd8e..12194dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,14 @@ -FROM alpine +FROM golang:alpine MAINTAINER Quey-Liang Kao # Last Modified: 2017/01/21 -ENV PATH /bin:/sbin:/usr/bin - -RUN apk update \ - && apk add go git +RUN apk update && apk add git RUN mkdir -p /src/github.com/gammons/ -RUN git clone https://github.com/gammons/todolist.git \ - && mv todolist /src/github.com/gammons/ - -ENV GOPATH / - -RUN go install github.com/gammons/todolist +RUN go-wrapper download github.com/gammons/todolist +RUN go-wrapper install github.com/gammons/todolist CMD ["todolist", "web"] EXPOSE 7890 - - -- cgit v1.3 From b6a310a42c65bc5f97c28db92c605363215716fe Mon Sep 17 00:00:00 2001 From: Michael Strüder Date: Sat, 29 Apr 2017 15:30:59 +0200 Subject: symlink todo-list file to $HOME --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 12194dc..a6a6a4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ RUN mkdir -p /src/github.com/gammons/ RUN go-wrapper download github.com/gammons/todolist RUN go-wrapper install github.com/gammons/todolist +RUN ln -s /.todos.json $HOME/.todos.json + CMD ["todolist", "web"] EXPOSE 7890 -- cgit v1.3 From 708c7ab7e53e54f340fdd69acbbb12b54608156e Mon Sep 17 00:00:00 2001 From: Michael Strüder Date: Wed, 3 May 2017 14:36:47 +0200 Subject: remove maintainer and last-modified lines from Dockerfile All contributers to this Dockerfile will be attributed through git. Since it is a simple Dockerfile, a dedicated maintainer is not necessary. Last-Modified timestamp is also availlable through git. --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a6a6a4e..65a399e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,4 @@ FROM golang:alpine -MAINTAINER Quey-Liang Kao -# Last Modified: 2017/01/21 RUN apk update && apk add git -- cgit v1.3