Skip to content

Commit

Permalink
Move balena-cli download to a build stage with renovate management
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Aug 29, 2024
1 parent 0a91d28 commit acbf541
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 38 deletions.
89 changes: 52 additions & 37 deletions core/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,63 @@
FROM node:14.19.3-bullseye-slim as base
FROM debian:bullseye-slim AS balena-cli

WORKDIR /tmp

ENV DEBCONF_NONINTERACTIVE_SEEN=true
ENV DEBIAN_FRONTEND=noninteractive

# hadolint ignore=DL3008
RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates \
curl \
unzip && \
rm -rf /var/lib/apt/lists/*

# renovate: datasource=github-releases depName=balena-io/balena-cli
ARG BALENA_CLI_VERSION=v18.2.34

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install balena-cli via standlone zip
RUN ARCH="$(dpkg --print-architecture | sed 's/amd/x/')" && \
curl -fsSL -o balena-cli.zip "https://github.com/balena-io/balena-cli/releases/download/${BALENA_CLI_VERSION}/balena-cli-${BALENA_CLI_VERSION}-linux-${ARCH}-standalone.zip" && \
unzip balena-cli.zip && \
cp -a balena-cli /usr/local/lib/balena-cli && \
ln -sf /usr/local/lib/balena-cli/balena /usr/local/bin/balena && \
balena version

# The standalone balena-cli package is currently glibc only (no alpine/musl support)
FROM node:14.19.3-bullseye-slim AS base

WORKDIR /usr/app

ENV DEBCONF_NONINTERACTIVE_SEEN true
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
ENV DEBIAN_FRONTEND=noninteractive

# install docker, balena-cli dependencies, and suite dependencies
# https://github.com/balena-io/balena-cli/blob/master/INSTALL-LINUX.md#additional-dependencies
# hadolint ignore=DL3008
RUN apt-get update && apt-get install --no-install-recommends -y \
bind9-dnsutils \
ca-certificates \
docker.io \
git \
iproute2 \
jq \
openssh-client \
socat \
rsync \
unzip \
util-linux \
wget \
vim \
build-essential \
make \
python && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ARG BALENA_CLI_REF="v19.0.0"
ARG BALENA_CLI_VERSION="19.0.0"

# Install balena-cli via standlone zip, only compatible with glibc (not alpine/musl)
RUN if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ] ; \
then \
wget -q -O balena-cli.zip "https://github.com/balena-io/balena-cli/releases/download/${BALENA_CLI_REF}/balena-cli-v${BALENA_CLI_VERSION}-linux-arm64-standalone.zip" && \
unzip balena-cli.zip && rm balena-cli.zip ; \
else \
wget -q -O balena-cli.zip "https://github.com/balena-io/balena-cli/releases/download/${BALENA_CLI_REF}/balena-cli-v${BALENA_CLI_VERSION}-linux-x64-standalone.zip" && \
unzip balena-cli.zip && rm balena-cli.zip ; \
fi

# Add balena-cli to PATH
ENV PATH /usr/app/balena-cli:$PATH
bind9-dnsutils \
ca-certificates \
docker.io \
git \
iproute2 \
jq \
openssh-client \
socat \
rsync \
unzip \
util-linux \
wget \
vim \
build-essential \
make \
python && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY --from=balena-cli /usr/local/lib/balena-cli /usr/local/lib/balena-cli
COPY --from=balena-cli /usr/local/bin/balena /usr/local/bin/balena

RUN balena version

Expand Down
2 changes: 1 addition & 1 deletion core/contracts
Submodule contracts updated 97 files
+8 −691 .versionbot/CHANGELOG.yml
+0 −234 CHANGELOG.md
+0 −28 contracts/hw.device-type/advantech-ecu1370/advantech_logo.svg
+0 −38 contracts/hw.device-type/advantech-ecu1370/contract.json
+2 −2 contracts/hw.device-type/asus-tinker-board-s/contract.json
+0 −83 contracts/hw.device-type/beaglebone-ai64/beaglebone-ai64.svg
+0 −37 contracts/hw.device-type/beaglebone-ai64/contract.json
+0 −83 contracts/hw.device-type/beagleplay/beagleplay.svg
+0 −37 contracts/hw.device-type/beagleplay/contract.json
+0 −112 contracts/hw.device-type/bluechiptechnology-db1/Blue-Chip-Technology.svg
+0 −32 contracts/hw.device-type/bluechiptechnology-db1/contract.json
+0 −112 contracts/hw.device-type/bluechiptechnology-tm3/Blue-Chip-Technology.svg
+0 −33 contracts/hw.device-type/bluechiptechnology-tm3/contract.json
+40 −0 contracts/hw.device-type/generic-amd64-fde/contract.json
+10 −0 contracts/hw.device-type/generic-amd64-fde/generic-amd64-fde.svg
+0 −34 contracts/hw.device-type/imx8mm-lpddr4-evk/contract.json
+0 −94 contracts/hw.device-type/imx8mm-lpddr4-evk/imx8mm-lpddr4-evk.svg
+0 −38 contracts/hw.device-type/imx8mp-var-dart/contract.json
+0 −30 contracts/hw.device-type/imx8mp-var-dart/imx8mp-var-dart.svg
+0 −38 contracts/hw.device-type/iot-gate-imx8plus-d1d8/contract.json
+0 −54 contracts/hw.device-type/iot-gate-imx8plus-d1d8/iot-gate-imx8plus.svg
+9 −5 contracts/hw.device-type/iot-gate-imx8plus/contract.json
+0 −39 contracts/hw.device-type/jetson-agx-orin-devkit-64gb/contract.json
+0 −8 contracts/hw.device-type/jetson-agx-orin-devkit-64gb/jetson-agx-orin-devkit-64gb.svg
+0 −39 contracts/hw.device-type/jetson-orin-nano-seeed-j3010/contract.json
+0 −1 contracts/hw.device-type/jetson-orin-nano-seeed-j3010/jetson-orin-nano-seeed-j3010.svg
+0 −39 contracts/hw.device-type/jetson-orin-nx-seeed-j4012/contract.json
+0 −1 contracts/hw.device-type/jetson-orin-nx-seeed-j4012/jetson-orin-nx-seeed-j4012.svg
+0 −36 contracts/hw.device-type/kontron-mx8mm/contract.json
+0 −189 contracts/hw.device-type/kontron-mx8mm/kontron.svg
+0 −33 contracts/hw.device-type/lcbzu9/contract.json
+0 −3 contracts/hw.device-type/lcbzu9/lcbzu9.svg
+33 −1 contracts/hw.device-type/odyssey-x86/odyssey-x86.svg
+0 −1 contracts/hw.device-type/phyboard-lyra-am62xx-2/Phytec.svg
+0 −37 contracts/hw.device-type/phyboard-lyra-am62xx-2/contract.json
+4 −4 contracts/hw.device-type/radxa-cm3-rpicm4-ioboard/contract.json
+2 −2 contracts/hw.device-type/radxa-zero/contract.json
+0 −32 contracts/hw.device-type/raspberrypi4-unipi-neuron/contract.json
+0 −1 contracts/hw.device-type/raspberrypi4-unipi-neuron/raspberrypi4-unipi-neuron.svg
+0 −33 contracts/hw.device-type/raspberrypi5/contract.json
+0 −56 contracts/hw.device-type/raspberrypi5/raspberrypi5.svg
+0 −40 contracts/hw.device-type/revpi-connect-4/contract.json
+0 −204 contracts/hw.device-type/revpi-connect-4/revpi-connect-4.svg
+0 −39 contracts/hw.device-type/ucm-imx93/contract.json
+0 −54 contracts/hw.device-type/ucm-imx93/ucm-imx93.svg
+1 −1 contracts/sw.os+hw.device-type/alpine+fincm3/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+raspberry-pi/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+raspberrypi-pi2/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+raspberrypi3-64/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+raspberrypi3/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+raspberrypi4-64/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+raspberrypi400-64/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+raspberrypicm4-ioboard/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine+revpi-core-3/dependencies.tpl
+1 −1 contracts/sw.os+hw.device-type/alpine/dependencies.tpl
+0 −4 contracts/sw.os+hw.device-type/debian+jetson-agx-orin-devkit-64gb/distro-config.tpl
+2 −2 contracts/sw.os+hw.device-type/debian+jetson-agx-orin-devkit/distro-config.tpl
+2 −2 contracts/sw.os+hw.device-type/debian+jetson-orin-nano-devkit-nvme/distro-config.tpl
+0 −4 contracts/sw.os+hw.device-type/debian+jetson-orin-nano-seeed-j3010/distro-config.tpl
+0 −4 contracts/sw.os+hw.device-type/debian+jetson-orin-nx-seeed-j4012/distro-config.tpl
+2 −2 contracts/sw.os+hw.device-type/debian+jetson-orin-nx-xavier-nx-devkit/distro-config.tpl
+0 −4 contracts/sw.os+hw.device-type/ubuntu+jetson-agx-orin-devkit-64gb/distro-config.tpl
+2 −2 contracts/sw.os+hw.device-type/ubuntu+jetson-agx-orin-devkit/distro-config.tpl
+2 −2 contracts/sw.os+hw.device-type/ubuntu+jetson-orin-nano-devkit-nvme/distro-config.tpl
+0 −4 contracts/sw.os+hw.device-type/ubuntu+jetson-orin-nano-seeed-j3010/distro-config.tpl
+0 −4 contracts/sw.os+hw.device-type/ubuntu+jetson-orin-nx-seeed-j4012/distro-config.tpl
+2 −2 contracts/sw.os+hw.device-type/ubuntu+jetson-orin-nx-xavier-nx-devkit/distro-config.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+coral-dev/dependencies.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+raspberry-pi2/dependencies.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+raspberrypi0-2w-64/dependencies.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+raspberrypi3-64/dependencies.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+raspberrypi3/dependencies.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+raspberrypi4-64/dependencies.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+raspberrypi400-64/dependencies.tpl
+0 −0 contracts/sw.os+hw.device-type/ubuntu@impish+revpi-core-3/dependencies.tpl
+10 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+coral-dev/dependencies.tpl
+11 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+raspberry-pi2/dependencies.tpl
+11 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+raspberrypi0-2w-64/dependencies.tpl
+11 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+raspberrypi3-64/dependencies.tpl
+11 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+raspberrypi3/dependencies.tpl
+11 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+raspberrypi4-64/dependencies.tpl
+11 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+raspberrypi400-64/dependencies.tpl
+11 −0 contracts/sw.os+hw.device-type/ubuntu@kinetic+revpi-core-3/dependencies.tpl
+2 −4 contracts/sw.os/alpine/contract.json
+12 −1 contracts/sw.os/fedora/contract.json
+5 −1 contracts/sw.os/ubuntu/contract.json
+1 −1 contracts/sw.stack+sw.os+hw.device-type/golang+alpine/build.tpl
+1 −1 contracts/sw.stack+sw.os+hw.device-type/golang+alpine/run.tpl
+1 −1 contracts/sw.stack+sw.os+hw.device-type/node+alpine/build.tpl
+1 −1 contracts/sw.stack+sw.os+hw.device-type/node+alpine/run.tpl
+1 −1 contracts/sw.stack+sw.os+hw.device-type/python+alpine/run.tpl
+18 −18 contracts/sw.stack/dotnet/contract.json
+1 −2 contracts/sw.stack/golang/contract.json
+259 −20 contracts/sw.stack/node/contract.json
+38 −0 contracts/sw.stack/openjdk/contract.json
+36 −56 contracts/sw.stack/python/contract.json
+2 −2 package.json

0 comments on commit acbf541

Please sign in to comment.