Skip to content

Commit

Permalink
Update Dockerfile & README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kaishuu0123 committed Jul 17, 2020
1 parent c24b7de commit 0306165
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
FROM golang as builder
FROM golang:1.12 as builder

RUN go get github.com/kaishuu0123/erd-go
WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download
COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build

FROM alpine

RUN apk --no-cache add ca-certificates

WORKDIR /erd
COPY --from=builder /go/bin/erd-go .
COPY --from=builder /app/erd-go .

ENTRYPOINT ["/erd/erd-go"]
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# erd-go

[![GitHub release](https://img.shields.io/github/release/kaishuu0123/erd-go.svg)][releases]
[![Build Status](https://travis-ci.org/kaishuu0123/erd-go.svg?branch=master)](https://travis-ci.org/kaishuu0123/erd-go)
[![Coverage Status](https://coveralls.io/repos/github/kaishuu0123/erd-go/badge.svg)](https://coveralls.io/github/kaishuu0123/erd-go)
[![Docker Pulls](https://img.shields.io/docker/pulls/kaishuu0123/erd-go.svg)][docker]

[releases]: https://github.com/kaishuu0123/erd-go/releases
[docker]: https://hub.docker.com/r/kaishuu0123/erd-go/

Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.(convert to dot file)

Expand All @@ -11,7 +16,7 @@ Translates a plain text description of a relational database schema to a graphic

get binary from [releases page](https://github.com/kaishuu0123/erd-go/releases).

or
or

```
go get github.com/kaishuu0123/erd-go
Expand Down Expand Up @@ -50,6 +55,12 @@ ex.) convert to png from dot (use dot command)
cat examples/nfldb.er | erd-go | dot -Tpng -o nfldb.png
```

## Usage (Used by Docker container)

```
cat examples/nfldb.er | docker run --rm -i kaishuu0123/erd-go | docker run --rm -i risaacson/graphviz dot -T png > nfldb.png
```

## Example

see [examples directory](https://github.com/kaishuu0123/erd-go/blob/master/examples)
Expand Down

0 comments on commit 0306165

Please sign in to comment.