-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
50 lines (38 loc) · 1.53 KB
/
Dockerfile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
ARG UB_PROJ_ID=32838267
ARG ALPINE_VER=3.18
####
FROM docker.io/alpine:$ALPINE_VER AS uboot-base
RUN apk add --no-cache curl
COPY resources/scripts/build-helpers/gitlab_packages.sh /usr/local/bin/gitlab_packages
####
FROM uboot-base AS uboot
ARG UB_PROJ_ID
# Project ID for raspi-alpine/crosscompile-uboot
RUN gitlab_packages -p "$UB_PROJ_ID" -a u-boot-blob -d uboot \
&& gitlab_packages -p "$UB_PROJ_ID" -a u-boot-silent-blob -d uboot-silent
####
FROM uboot-base as uboot_tool
# Project ID for raspi-alpine/crosscompile-uboot-tool
RUN PROJ_ID="33098050" \
&& gitlab_packages -p "$PROJ_ID" -a uboot-tool
####
FROM docker.io/alpine:$ALPINE_VER as keys
RUN apk add alpine-keys
####
FROM docker.io/alpine:3.18
LABEL org.opencontainers.image.description Create minimal Linux images based on Alpine Linux for the Raspberry PI
LABEL org.opencontainers.image.licenses Apache-2.0
ARG UB_PROJ_ID
ENV DEFAULT_UBOOT_PROJ_ID=$UB_PROJ_ID
RUN apk add --no-cache --upgrade curl dosfstools e2fsprogs-extra findutils \
genimage git m4 mtools pigz tar u-boot-tools
ADD ./resources /resources
COPY --from=uboot /uboot/ /uboot/
COPY --from=uboot /uboot-silent/ /uboot-silent/
COPY --from=uboot_tool /uboot_tool /uboot_tool
COPY --from=keys /usr/share/apk/keys /usr/share/apk/keys-stable
RUN find /resources/scripts/build-helpers -name "*.sh" -exec install -t /usr/local/bin/ {} \; \
&& cd /usr/local/bin && for file in *.sh; do mv -- "$file" "$(basename "$file" .sh)"; done \
&& echo "installed:" && ls /usr/local/bin
WORKDIR /work
CMD ["/bin/sh", "/resources/build.sh"]