Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed Aug 5, 2020
1 parent b761ac0 commit 6f40702
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ FROM golang:1.14

RUN mkdir /app
WORKDIR /app
ARG VERSION

ADD . /app/
RUN go build -o main .
RUN go build -ldflags=-s -ldflags=-w -ldflags=-X=github.com/miguelmota/cointop/cointop.version=$VERSION -o main .
RUN mv main /bin/cointop

ENTRYPOINT cointop
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ release:
VERSION=$(VERSION) goreleaser

docker-build:
docker build -t cointop/cointop .
docker build --build-arg VERSION=$(VERSION) -t cointop/cointop .

docker-run:
docker run -it cointop/cointop
Expand Down
2 changes: 1 addition & 1 deletion cointop/statusbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (ct *Cointop) UpdateStatusbar(s string) error {

base := fmt.Sprintf("%s%s %sHelp %sChart %sRange %sSearch %sConvert %s %s %sSave", "[Q]", quitText, "[?]", "[Enter]", "[[ ]]", "[/]", "[C]", favoritesText, portfolioText, "[CTRL-S]")
str := pad.Right(fmt.Sprintf("%v %sPage %v/%v %s", base, "[← →]", currpage, totalpages, s), ct.maxTableWidth, " ")
v := fmt.Sprintf("v%s", ct.Version())
v := fmt.Sprintf("%s", ct.Version())
end := len(str) - len(v) + 2
if end > len(str) {
end = len(str)
Expand Down

0 comments on commit 6f40702

Please sign in to comment.