Added docker
This commit is contained in:
parent
c178d644f6
commit
e0db43db01
2 changed files with 25 additions and 0 deletions
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
FROM golang:1.17-alpine as builder
|
||||||
|
WORKDIR /usr/src
|
||||||
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
RUN GOPROXY=${PROXY} go mod download
|
||||||
|
COPY . .
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o pomodoro .
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
WORKDIR /usr/app
|
||||||
|
COPY --from=builder /usr/src/pomodoro .
|
||||||
|
CMD ["./pomodoro"]
|
13
README.md
13
README.md
|
@ -13,6 +13,19 @@ Grab binaries for different OS from https://github.com/neonxp/pomodoro/releases
|
||||||
brew install neonxp/tap/pomodoro
|
brew install neonxp/tap/pomodoro
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
Build image:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build -t pomodoro .
|
||||||
|
```
|
||||||
|
|
||||||
|
Run image
|
||||||
|
```shell
|
||||||
|
docker run -it --rm pomodoro
|
||||||
|
```
|
||||||
|
|
||||||
### With golang
|
### With golang
|
||||||
```
|
```
|
||||||
go install github.com/neonxp/pomodoro@latest
|
go install github.com/neonxp/pomodoro@latest
|
||||||
|
|
Loading…
Reference in a new issue