Skip to content

Commit

Permalink
Adding support for the Apple Silicon and fixed #590
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Mar 12, 2021
1 parent 42e64ac commit 2b20839
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 20 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/docker.yml
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
-
name: checkout
name: Checkout
uses: actions/checkout@v2
-
name: docker meta
name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
Expand All @@ -23,26 +23,38 @@ jobs:
v{{major}}.{{minor}}
v{{major}}.{{minor}}.{{patch}}
-
name: set up QEMU
name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
-
name: set up Docker Buildx
uses: docker/setup-buildx-action@v1
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
-
name: login to DockerHub
name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: build and push
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
context: ./
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
2 changes: 0 additions & 2 deletions .goreleaser.yaml
Expand Up @@ -25,8 +25,6 @@ builds:
goarch: 386
- goos: darwin
goarch: arm
- goos: darwin
goarch: arm64
- goos: windows
goarch: 386
- goos: windows
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
@@ -1,12 +1,10 @@
FROM golang:1.15-alpine as build
FROM golang:1.16-alpine as build
RUN apk --no-cache add git
RUN go get -d -v github.com/OWASP/Amass/v3/...
WORKDIR /go/src/github.com/OWASP/Amass
RUN go install -v ./...
ENV GO111MODULE on
RUN go get -v github.com/OWASP/Amass/v3/...

FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=build /go/bin/amass /bin/amass
COPY --from=build /go/src/github.com/OWASP/Amass/examples/wordlists/ /wordlists/
ENV HOME /
ENTRYPOINT ["/bin/amass"]
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/OWASP/Amass/v3

go 1.15
go 1.16

require (
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96
Expand Down
5 changes: 1 addition & 4 deletions snapcraft.yaml
Expand Up @@ -32,10 +32,7 @@ parts:
go-channel: latest/stable
source: ignored
source-type: git
override-pull: |
go get -d github.com/OWASP/Amass/v3/...
override-build: |
cd $GOPATH/src/github.com/OWASP/Amass
go install ./...
GO111MODULE=on go get github.com/OWASP/Amass/v3/...
stage:
- $GOPATH/bin/amass

0 comments on commit 2b20839

Please sign in to comment.