Skip to content

Commit

Permalink
Update proxyscotch.scratch.Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Tob1as committed Dec 24, 2024
1 parent 5f649f4 commit 1defc80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion proxyscotch.scratch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM golang:alpine AS builder

ARG VERSION

ENV GOPATH=/go
ENV CGO_ENABLED=0

SHELL ["/bin/ash", "-euxo", "pipefail", "-c"]

WORKDIR /go/src/proxyscotch
Expand All @@ -12,7 +15,8 @@ RUN apk add --no-cache git ; \
VERSION=${VERSION:-$(wget -qO- https://api.github.com/repos/hoppscotch/proxyscotch/releases/latest | grep 'tag_name' | cut -d\" -f4)} ; \
echo "Proxyscotch Version = ${VERSION}" ; \
git clone --branch "${VERSION}" --single-branch https://github.com/hoppscotch/proxyscotch.git . ; \
export $(grep -v '^#' version.properties | xargs) ; \
#rm go.mod go.sum && go mod init github.com/hoppscotch/proxyscotch && go mod tidy ; \
export $(grep -v '^#' ./version.properties | xargs) ; \
# https://github.com/hoppscotch/proxyscotch/blob/master/build.sh#L217
GOOS="$(go env GOOS)" GOARCH="$(go env GOARCH)" go build -ldflags "-X main.VersionName=$VERSION_NAME -X main.VersionCode=$VERSION_CODE" -o "${GOPATH}/bin/proxyscotch" server/server.go ; \
proxyscotch --help
Expand Down

0 comments on commit 1defc80

Please sign in to comment.