Skip to content

Commit

Permalink
Use latest version and fix release file name in Dockerfile.template
Browse files Browse the repository at this point in the history
Change-type: patch
Co-authored-by: Jonathan Berger <[email protected]>
Signed-off-by: Rahul Thakoor <[email protected]>
  • Loading branch information
rahul-thakoor and Jonathan Berger committed Apr 24, 2024
1 parent ff53d07 commit 55c2827
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian
ARG BALENA_ARCH=%%BALENA_ARCH%%

FROM balenalib/$BALENA_ARCH-debian

RUN install_packages dnsmasq wireless-tools

# use latest version. If specific version is required, it should be provided as vX.Y.Z, e.g v4.11.37
ARG VERSION=latest

WORKDIR /usr/src/app

ARG VERSION="4.4.0"
RUN curl -Ls "https://github.com/balena-io/wifi-connect/releases/download/v$VERSION/wifi-connect-v$VERSION-linux-%%BALENA_ARCH%%.tar.gz" \
| tar -xvz -C /usr/src/app/
RUN \
case $BALENA_ARCH in \
"rpi") \
BINARY_ARCH_NAME="arm-unknown-linux-gnueabihf" ;; \
"aarch64") \
BINARY_ARCH_NAME="aarch64-unknown-linux-gnu" ;; \
"amd64") \
BINARY_ARCH_NAME="x86_64-unknown-linux-gnu.tar.gz" ;;\
"armv7hf") \
BINARY_ARCH_NAME="armv7-unknown-linux-gnueabihf.tar.gz" ;;\
*) \
echo >&2 "error: unsupported architecture ($BALENA_ARCH)"; exit 1 ;; \
esac &&\
curl -Ls "https://github.com/balena-os/wifi-connect/releases/download/${VERSION}/wifi-connect-$BINARY_ARCH_NAME.tar.gz" \
| tar -xvz -C /usr/src/app/

COPY scripts/start.sh .

Expand Down

0 comments on commit 55c2827

Please sign in to comment.