blog/Dockerfile

29 lines
560 B
Docker
Raw Normal View History

2018-06-07 18:51:44 +00:00
# Dockerfile for the blog.
#
# Building:
#
# docker build -t blog .
#
# Running:
#
# # listen on localhost:8000 and use /home/user/www as the user root
# docker run -p 8000:80 -v /home/user/www:/data/www blog
#
# Running and Backgrounding:
#
# # run it with a name to start with
# docker run -d --name blog -v /home/user/www:/data/www blog
#
# # later...
# docker start blog
2018-09-18 18:21:11 +00:00
FROM golang:1.10
2018-06-07 18:51:44 +00:00
WORKDIR /go/src/github.com/kirsle/blog
2018-09-18 18:21:11 +00:00
COPY . .
2018-06-07 18:51:44 +00:00
2018-09-18 18:21:11 +00:00
RUN go get -d -v ./...
RUN go install -v ./...
2018-06-07 18:51:44 +00:00
EXPOSE 80
2018-09-18 18:21:11 +00:00
CMD ["blog", "-a", ":80", "/data/www"]