Skip to content

Commit

Permalink
#32 remove targetplatfom arg in dockerfile (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakito committed May 31, 2023
1 parent 2ac4963 commit 4702207
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@ RUN apt-get update && apt-get install -y upx curl

ARG VERSION=main
ARG BUILD="N/A"
ARG TARGETPLATFORM=linux/amd64

ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux

COPY . /go/src/app/

RUN export GOARCH=$(basename ${TARGETPLATFORM}) && \
echo "GOARCH ${GOARCH}" && \
go build -a -installsuffix cgo -ldflags="-w -s -X github.com/bakito/sealed-secrets-web/pkg/version.Version=${VERSION} -X github.com/bakito/sealed-secrets-web/pkg/version.Build=${BUILD}" -o sealed-secrets-web . && \
RUN go build -a -installsuffix cgo -ldflags="-w -s -X github.com/bakito/sealed-secrets-web/pkg/version.Version=${VERSION} -X github.com/bakito/sealed-secrets-web/pkg/version.Build=${BUILD}" -o sealed-secrets-web . && \
upx -q sealed-secrets-web


# application image
FROM alpine:latest
WORKDIR /opt/go
Expand Down

0 comments on commit 4702207

Please sign in to comment.