-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
37 lines (32 loc) · 1.43 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
ARG MENDER_CLI_VERSION=1.11.0
ARG MENDER_ARTIFACT_VERSION=3.10.1
ARG MENDER_CLIENT_VERSION=3.5.1
ARG MENDER_APP_UPDATE_MODULE_VERSION=master
FROM golang:1.22 as cli-builder
WORKDIR /go/src/github.com/mendersoftware/mender-cli
ARG MENDER_CLI_VERSION
RUN git clone https://github.com/mendersoftware/mender-cli.git . && \
git checkout $MENDER_CLI_VERSION && \
make get-build-deps && \
make build
FROM golang:1.22 as artifact-builder
WORKDIR /go/src/github.com/mendersoftware/mender-artifact
ARG MENDER_ARTIFACT_VERSION
RUN git clone https://github.com/mendersoftware/mender-artifact.git . && \
git checkout $MENDER_ARTIFACT_VERSION && \
make get-build-deps || ( \
apt-get update -qq && \
apt-get install -yyq $(cat deb-requirements.txt) ) && \
make build
FROM golang:1.22 as client-builder
WORKDIR /go/src/github.com/mendersoftware/mender
ARG MENDER_CLIENT_VERSION
RUN git clone https://github.com/mendersoftware/mender.git . && \
git checkout $MENDER_CLIENT_VERSION && \
DESTDIR=/install-modules-gen make install-modules-gen
FROM debian:12.5-slim
COPY --from=cli-builder /go/src/github.com/mendersoftware/mender-cli /usr/bin/
COPY --from=artifact-builder /go/src/github.com/mendersoftware/mender-artifact/mender-artifact /usr/bin/
COPY --from=client-builder /install-modules-gen/usr/bin/ /usr/bin/
# Bring in libssl for mender-artifact signing to work
RUN apt-get update && apt-get install libssl3 -y && apt-get clean