Skip to content

Commit

Permalink
docker: add Dockerfile (#14)
Browse files Browse the repository at this point in the history
Add docker file and describe how to use dockerized boa.
  • Loading branch information
oncilla authored Jun 28, 2020
1 parent 130dbea commit 8b69f42
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM golang:latest as builder

WORKDIR /boa
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o ./boa ./cmd/boa

FROM golang:latest
LABEL maintainer="Dominik Roos <[email protected]>"

ARG WORKDIR=/workdir
RUN mkdir -p ${WORKDIR}
WORKDIR /workdir
COPY --from=builder /boa/boa /usr/local/bin

ENTRYPOINT ["boa"]
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ A venom-free generator for cobra applications.
go get -u github.com/oncilla/boa/cmd/boa
```

## Docker

If you prefer using docker instead:

```txt
WORKDIR=$(pwd)/path/to/application
docker run \
-v $WORKDIR/:/workdir \
--user "$(id -u):$(id -g)" \
docker.pkg.github.com/oncilla/boa/boa:latest
```

## Getting started

`boa` proposes a different layout than what `cobra` proposes as a [typical
Expand Down

0 comments on commit 8b69f42

Please sign in to comment.