Skip to content

Commit

Permalink
Docker buildx commands + brew install command
Browse files Browse the repository at this point in the history
  • Loading branch information
EwenQuim committed Jun 10, 2024
1 parent 8de58f9 commit 3a163cc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
testdata
testdata/*
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM golang:1.22 as builder

ARG TARGETARCH

WORKDIR /go/src

COPY . .

RUN go mod download
RUN mkdir /data

RUN go build -ldflags "-s -w" -o entropy .
RUN GOOS=linux GOARCH=${TARGETARCH} go build -ldflags "-s -w" -o entropy .

# Path: Dockerfile
FROM scratch
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docker-build:
docker buildx build --platform linux/amd64,linux/arm64 --tag ewenquim/entropy:latest .
docker-buildx:
docker buildx build --platform linux/amd64,linux/arm64 --tag ewenquim/entropy:latest --push .

docker-run:
docker run --rm -v $(pwd):/data ewenquim/entropy /data
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ go run github.com/EwenQuim/entropy@latest

### With brew

WIP
```bash
brew install ewenquim/repo/entropy
entropy

# More options
entropy -h
entropy -top 20 -ext go,py,js
entropy -top 5 -ignore-ext min.js,_test.go,pdf,png,jpg my-folder my-file1 my-file2
```

### With docker

Expand Down

0 comments on commit 3a163cc

Please sign in to comment.