Skip to content

Commit

Permalink
Merge pull request #17 from egregors/docker
Browse files Browse the repository at this point in the history
Docker image
  • Loading branch information
freetonik authored Nov 1, 2019
2 parents 8a6956d + ffcfb00 commit 3440a70
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!app
!vendor
!go.mod
!go.sum
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM golang:1.13.3-alpine3.10 as builder
ADD . /build
WORKDIR /build
RUN GO111MODULE=on CGO_ENABLED=0 go build -mod=vendor -o underblog ./app/main.go

FROM scratch
COPY --from=builder /build/underblog /app/underblog
ENV PATH "/app:${PATH}"
WORKDIR /blog
CMD ["underblog"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ On MacOS:
brew install freetonik/tap/underblog
```

Docker:

```
docker run --rm -it -v /path/to/your/blog:/blog freetonik/underblog
```

Other platforms: coming soon. Or you can build yourself by cloning the repo and running `make build`.

## How it works
Expand Down

0 comments on commit 3440a70

Please sign in to comment.