Rebase Dockerfile on golang:1.10
This commit is contained in:
parent
d9a1e6a3c0
commit
b31eb284f0
14
Dockerfile
14
Dockerfile
|
@ -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"]
|
||||
|
|
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user