Skip to content

Commit

Permalink
revert to cli main
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed Apr 22, 2024
1 parent 464be96 commit 78f6f88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 40 deletions.
46 changes: 7 additions & 39 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18 AS base
FROM alpine:3.15.0@sha256:c74f1b1166784193ea6c8f9440263b9be6cae07dfe35e32a5df7a31358ac2060 AS base

RUN apk add --update --no-cache \
nodejs~=16 \
Expand All @@ -9,55 +9,23 @@ RUN apk add --update --no-cache \

WORKDIR /root

RUN apk add --no-cache \
bash \
curl \
docker-cli \
jq \
minicom \
netcat-openbsd \
openssh-client \
qemu-img \
qemu-system-x86_64 \
unzip \
wget \
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.11/main \
procmail


# --- build
FROM base AS build

RUN apk add --no-cache -t .build-deps \
build-base \
git \
linux-headers \
python3

COPY run-tests.sh package*.json *.js ./

RUN npm i && apk del --purge .build-deps
# install npm in a separate build stage to save space in the runtime image
RUN apk add --update --no-cache npm

COPY package.json *.js ./
RUN npm i

# --- runtime
FROM base AS run

WORKDIR /data/

COPY --from=build /root/ /root/

COPY *.yml ./

COPY docker-hc balena.sh /usr/sbin/

RUN ln -sf /root/node_modules/balena-cli/bin/balena /usr/bin/balena

# create qemu-bridge-helper ACL file
# https://wiki.qemu.org/Features/HelperNetworking
RUN mkdir -p /etc/qemu \
&& echo "allow all" > /etc/qemu/bridge.conf \
&& chmod 0640 /etc/qemu/bridge.conf \
&& addgroup root qemu \
&& addgroup root kvm
&& chmod 0640 /etc/qemu/bridge.conf

WORKDIR /data/
CMD /root/cli.js
1 change: 0 additions & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"balena-cli": "^13.2.1",
"mz": "^2.7.0",
"yaml": "^1.10.2",
"yargs": "^17.5.0"
Expand Down

0 comments on commit 78f6f88

Please sign in to comment.