-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 943 Bytes
/
Dockerfile
File metadata and controls
42 lines (34 loc) · 943 Bytes
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
# Build the initramfs image in docker:
#
# docker build -t bootcount-builder .
# TARBALL=$(docker run --rm -it bootcount-builder ls -1 dist/ | tr -d '\r' | tr -d '\n')
# CONTAINER=$(docker create bootcount-builder)
# docker cp $CONTAINER:/opt/dist/$TARBALL .
# docker rm "$CONTAINER"
#
#FROM debian:bookworm-slim
FROM ubuntu:22.04 AS build
#ARG TARGET_ARCH=arm-linux-gnueabihf
ARG TARGET_ARCH=aarch64-linux-gnu
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
ENV LANG=${LC_ALL}
ENV TARGET_ARCH=${TARGET_ARCH}
RUN echo "# Setup system" \
&& set -x \
&& apt-get update -y \
&& apt-get install -y \
build-essential \
gcc-${TARGET_ARCH} \
automake \
&& apt-get clean \
&& sync
WORKDIR /opt
ADD . .
RUN ./autogen.sh
RUN ./configure --prefix=/usr --host=${TARGET_ARCH}
RUN make
RUN make binary-dist
# Minimal export stage: only copy dist artifacts
FROM scratch AS export
COPY --from=build /opt/dist/ .