forked from lf-edge/eve
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 1.16 KB
/
Copy pathDockerfile
File metadata and controls
36 lines (26 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# syntax=docker/dockerfile-upstream:1.5.0-rc2-labs
# SPDX-License-Identifier: Apache-2.0
FROM lfedge/eve-alpine:956e170f3908aa5148b0ddb130e60fd862c7988b AS build-base
FROM build-base AS build-amd64
FROM build-base AS build-arm64
FROM build-base AS build-riscv64
# hadolint ignore=DL3006
FROM build-${TARGETARCH} AS build
ENV BUILD_PKGS git gcc make libc-dev linux-pam-dev m4 findutils util-linux make patch
RUN eve-alpine-deploy.sh
ENV FSCRYPT_COMMIT=v0.3.4
WORKDIR /go/src/github.com/google/fscrypt
# hadolint ignore=DL3020
ADD --keep-git-dir=true https://github.com/google/fscrypt.git#${FSCRYPT_COMMIT} .
COPY patch/* ./
# hadolint ignore=SC1097
RUN set -e && for patch in *.patch; do \
echo "Applying $patch"; \
patch -p1 < "$patch"; \
done
RUN make -j "$(getconf _NPROCESSORS_ONLN)" && make DESTDIR="/out/opt/zededa" PREFIX="" install
# Register fscrypt in the APK DB, mandatory for it to be included in the SBOM.
RUN register-sbom-pkg.sh -n fscrypt -v "${FSCRYPT_COMMIT}" -l Apache-2.0 -u https://github.com/google/fscrypt
FROM scratch
COPY --from=build /out/opt/zededa/bin /opt/zededa/bin
COPY --from=build /out/lib/apk/db/installed /lib/apk/db/installed