Rebase Dockerfile on golang:1.10
This commit is contained in:
parent
d9a1e6a3c0
commit
b31eb284f0
14
Dockerfile
14
Dockerfile
|
@ -16,17 +16,13 @@
|
||||||
#
|
#
|
||||||
# # later...
|
# # later...
|
||||||
# docker start blog
|
# docker start blog
|
||||||
FROM fedora:latest
|
FROM golang:1.10
|
||||||
|
|
||||||
RUN dnf -y update
|
|
||||||
RUN dnf -y install golang make
|
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/kirsle/blog
|
WORKDIR /go/src/github.com/kirsle/blog
|
||||||
ADD . /go/src/github.com/kirsle/blog
|
COPY . .
|
||||||
|
|
||||||
ENV GOPATH /go
|
RUN go get -d -v ./...
|
||||||
RUN go get ./...
|
RUN go install -v ./...
|
||||||
RUN make build
|
|
||||||
|
|
||||||
EXPOSE 80
|
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
|
# `make docker.run` to run the docker image
|
||||||
.PHONY: docker.run
|
.PHONY: docker.run
|
||||||
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
|
This app includes a Dockerfile. Type `make docker.build` to build the
|
||||||
Docker image.
|
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
|
### Quick Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
Loading…
Reference in New Issue
Block a user