Rebase Dockerfile on golang:1.10

This commit is contained in:
Noah 2018-09-18 11:21:11 -07:00
parent d9a1e6a3c0
commit b31eb284f0
3 changed files with 13 additions and 10 deletions

View File

@ -16,17 +16,13 @@
#
# # later...
# docker start blog
FROM fedora:latest
RUN dnf -y update
RUN dnf -y install golang make
FROM golang:1.10
WORKDIR /go/src/github.com/kirsle/blog
ADD . /go/src/github.com/kirsle/blog
COPY . .
ENV GOPATH /go
RUN go get ./...
RUN make build
RUN go get -d -v ./...
RUN go install -v ./...
EXPOSE 80
CMD ["/go/src/github.com/kirsle/blog/bin/blog", "-a", ":80", "/data/www"]
CMD ["blog", "-a", ":80", "/data/www"]

View File

@ -47,4 +47,4 @@ docker.build:
# `make docker.run` to run the docker image
.PHONY: docker.run
docker.run:
docker run --rm --name blog_debug -p 8000:80 -v $(CURDIR)/user-root:/data/www blog
docker run --rm --name blog_debug -p 8000:80 -v "$(CURDIR)/user-root:/data/www:z" blog

View File

@ -77,6 +77,13 @@ make run
This app includes a Dockerfile. Type `make docker.build` to build the
Docker image.
The Docker container uses the user document root at `/data/www`
```bash
docker build -t blog .
docker run --rm --name blog_debug -p 8000:80 -v $(CURDIR)/user-root:/data/www blog
```
### Quick Start
```bash