FROM golang:1.18 as builder
RUN apt-get update && \
apt-get install -y \
gcc gcc-mingw-w64 gcc-multilib \
git make \
musl-dev liblzma-dev libssl-dev
RUN mkdir -p /go/src/github.com/mendersoftware/mender-artifact
WORKDIR /go/src/github.com/mendersoftware/mender-artifact
COPY ./ .
RUN make build-natives
FROM alpine:3.16.2
RUN apk add --no-cache libc6-compat xz-dev libressl-dev
COPY --from=builder /go/src/github.com/mendersoftware/mender-artifact/mender-artifact* /go/bin/
ENTRYPOINT [ "/go/bin/mender-artifact-linux" ]
|