Skip to content

Commit

Permalink
Fixed Docker build for arm64 in GH Action (#103)
Browse files Browse the repository at this point in the history
try to fix #102
  • Loading branch information
msoap committed Mar 23, 2024
1 parent 3b2a3c0 commit 1ccddb6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Expand Up @@ -3,6 +3,11 @@
# build image
FROM --platform=$BUILDPLATFORM golang:alpine as go_builder

ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH

RUN apk add --no-cache git

ADD . $GOPATH/src/github.com/msoap/shell2http
Expand All @@ -15,6 +20,7 @@ ENV GOARM=6
ENV GOARCH=$TARGETARCH
ENV GOOS=linux

RUN echo "Building for $GOOS/$GOARCH"
RUN go build -v -trimpath -ldflags="-w -s -X 'main.version=$(git describe --abbrev=0 --tags | sed s/v//)'" -o /go/bin/shell2http .

# final image
Expand Down

0 comments on commit 1ccddb6

Please sign in to comment.